bhdresh / CVE-2017-0199

Exploit toolkit CVE-2017-0199 - v4.0 is a handy python script which provides pentesters and security researchers a quick and effective way to test Microsoft Office RCE. It could generate a malicious RTF/PPSX file and deliver metasploit / meterpreter / other payload to victim without any complex configuration.
724 stars 261 forks source link

Not delivering hta or exe #22

Closed SoniaKhan closed 7 years ago

SoniaKhan commented 7 years ago

I tried all steps, but no luck for me. python script only shows Received Get method from IP. then nothing happened.

bhdresh commented 7 years ago

Could you share the commands and screenshots to understand the setup?

hiaby commented 7 years ago

Hi, bro, the same problem) I m using vps debian 8. Create rtf using the toolkit (ex. Ip 185.xx.1xx.175) with apache2 running! When the Invoice.rtf successfully created I run apache2 stop, then run the python command -M with the same ip(185.xx.1xx.175)/malicious.exe tmp/malicious.exe. when i open rtf on the remote victim machine(ip95.29.xxx.xxx) nothing happens

hiaby commented 7 years ago

However when i run it locally using msf i get the meterpreter

hiaby commented 7 years ago

Ups, testing on Win7 sp2

horllste commented 7 years ago

did you open the ports on your vps?

hiaby commented 7 years ago

Yes.port 80 open

hiaby commented 7 years ago

With python server running when you connect to server ip directly via browser the hta gets downloaded . Even if i open the hta nothing happens

bhdresh commented 7 years ago

@hiaby, are you testing on windows? Try Linux.

hiaby commented 7 years ago

No, i have a linux vps. I try to open malicious.rtf on win7 .

hiaby commented 7 years ago

Can you make a video of remote work. I can give you access to my vps if you need..

hiaby commented 7 years ago

A tutorial type like for version 2 on youtube

hiaby commented 7 years ago

screenshot_20170511-200233

hiaby commented 7 years ago

So as you see when I open the malicious rtf it gets 2 Get requests and nothing happens next...

hiaby commented 7 years ago

And what is eror no 104 connection fefused by peer

bhdresh commented 7 years ago

@hiaby, what is the IE version on target? Also, make sure you have copied your exe payload to /tmp folder if you specify -l /tmp/iexplorer.exe argument.

hiaby commented 7 years ago

Yes I did copy to tmp. Should I make any extra configurations to apache2 perhaps? IE version 11 Are you sure the hta file is correct? I tested again locally (kali in wmware, win 7 host machine) it sometimes fails to create malicious rtf.. just a blank rtf as an output. However yesterday it worked locally perfectly well with a meterpreter shell.. What if i put the maliciuos.exe in the var/www/html myself, then run python ** -l /var/www/html..

hiaby commented 7 years ago

Does it only work on port 80?

hiaby commented 7 years ago

Can I make it listen on 443?

hiaby commented 7 years ago

May it is a problem connected with ports? When using hta + local payload same port to connect? Interference?

hiaby commented 7 years ago

It gets hta, hta runs to download main payload from the same location same port ...when meterpreter is used it uses different port, right?

hiaby commented 7 years ago

So one must have two vps to run... one to host the hta and the python server, another to host the payload.. or ..

bhdresh commented 7 years ago

payload and hta both will be delivered by python script on specified port which is default 80, the -l argument will let script know from where it should read the payload when a request to exe is received.

bhdresh commented 7 years ago

Try with no obfuscation -x 0 argument to ensure that obfuscation is not breaking the structure of RTF.

hiaby commented 7 years ago

Ok. By the way how do i stop the py server.. any command? When using vps i have to reboot all the time )))

hiaby commented 7 years ago

Now testing versio 18/04/2017 - with server.py and manual rtf creation

hiaby commented 7 years ago

Yes version 1 works perfect!!!

hiaby commented 7 years ago

screenshot_20170511-230620

hiaby commented 7 years ago

img_20170511_230640

hiaby commented 7 years ago

So it is about obfuscation, bro...

hiaby commented 7 years ago

Hopefully you have time to fix the issue. Thanks for your big work.

hiaby commented 7 years ago

Perhaps you should make a separate obfuscation tool for it.. to use it in manual mode...

bhdresh commented 7 years ago

Glad that it worked for you.

Meanwhile you could try to generate another obfuscated RTF file and check again, the script generates dynamic RTF each time.

bhdresh commented 7 years ago

Can you try to generate non-obfuscated RTF with -x 0 argument using v3.0 script and check again?

hiaby commented 7 years ago

Ok I will. But I m dying for a sleep... will check tomorrow

bhdresh commented 7 years ago

Sure, thanks.