Skip to contentSkip to conversation

Trojan Spyware Malware Control

DISCUSSION TRM 3 participants 3 messages Jan 25, 2008 – Jan 26, 2008

lore
Share & tools
lore

TRM

author
#0 lore raw

Hi List,
Using iptables rules in my gateway, how can i control/stop
Trojan,malware,spyware.
example, tutorial, docs, link anything if i can get from the list, it'll be my pleasure.

Thanks

Signature · 3 lines
Tarak Ranjan

Send instant messages to your online friends http://in.messenger.yahoo.com 
#1 lore raw
Quoted 1 line · TRM

Using iptables rules in my gateway, how can i control/stop Trojan,malware,spyware. example, tutorial, docs, link anything if i can get from the list, it'll be my pleasure.

This is akin to filtering phone calls purely by phone number only, no names. If you know the source address of good connections, you can allow them. However with out some information as to where the trojan, malware, spyware, you are trying to block, there is little (but some) you can do at the network / transport level.

Firewalls are not intended to block this type of traffic, you should use something that is.

Grant. . . .

#2 lore raw
Quoted 10 lines · Grant Taylor
Quoted 3 lines · TRM

Using iptables rules in my gateway, how can i control/stop Trojan,malware,spyware. example, tutorial, docs, link anything if i can get from the list, it'll be my pleasure.

This is akin to filtering phone calls purely by phone number only, no names. If you know the source address of good connections, you can allow them. However with out some information as to where the trojan, malware, spyware, you are trying to block, there is little (but some) you can do at the network / transport level.

There are also some things that iptables can do at the application layer with the string match extension along with translated Snort rules. The fwsnort project http://www.cipherdyne.org/fwsnort/ (disclaimer: I wrote it, so I'm obviously biased) can accomplish this translation.

For example, here is a Snort rule that describes some Spyware activity:

alert tcp $HOME_NET any -> $EXTERNAL_NET $HTTP_PORTS (msg:
"BLEEDING-EDGE MALWARE 180solutions Spyware (tracked event reported)";
flow: to_server,established; uricontent:"/TrackedEvent.aspx?"; nocase; uricontent:"eid="; nocase; reference:url,securityresponse.symantec.com/avcenter/venc/data/pf/adware.180search.html;
classtype: trojan-activity; sid: 2001397; rev:6; )

Using fwsnort, this becomes the following iptables command:

$IPTABLES -A FWSNORT_FORWARD_ESTAB -p tcp --dport 80 -m string --string "/TrackedEvent.aspx?" --algo bm -m string --string "eid=" --algo bm -m comment --comment "sid:2001397; msg:BLEEDING-EDGE MALWARE 180solutions Spyware (tracked event reported); classtype:trojan-activity; reference:url,securityresponse.symantec.com/avcenter/venc/data/pf/adware.180search.html; rev:6; FWS:1.0.3;" -j LOG --log-ip-options --log-tcp-options
--log-prefix "[118] SID2001397 ESTAB "

All iptables commands built up by fwsnort are stored within the script /etc/fwsnort/fwsnort.sh for easy execution.

Quoted 2 lines

Firewalls are not intended to block this type of traffic, you should use something that is.

In general, I agree with this. If you want really good detection measures for activity associated with Spyware et.al., then frequently decoding operations against web traffic as well as pcre's become involved, and at that point there is no viable iptables alternative (unless you are running Snort inline built on top of the QUEUE target or some such).

However, in some cases, having iptables offer some protection (after all, it is inline by definition) can be handy.

--
Michael Rash
http://www.cipherdyne.org/
Key fingerprint = 53EA 13EA 472E 3771 894F AC69 95D8 5D6B A742 839F

Quoted 5 lines

Grant. . . .
-
To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html