Who said you can’t have fun while performing your Security Analyst job? This is what my colleague post to me early in the morning.
my_colleague: PRIVMSG #fakap :aktiviti harian pepagi… berak!!! #my chat payload
my_colleague: hahahahah
my_colleague:
)
me: hahaha #what else can I do besides laughing? Damned sometimes I do hate security analyst.
)
p/s: Now what I have to do is disable these chat related rules at our sensors
update: Ok, I do feel lil bit strange why my chat at webchat.org traffics trigger the alerts while the ones at freenode.org didn’t. I asked my colleague to tell me the alert message and here it is :
BLEEDING-EDGE ATTACK RESPONSE IRC – Private message on non-std port
Ahh okay, now let see what will trigger this alert.
alert tcp $HOME_NET any -> $EXTERNAL_NET !6661:6668 (msg: “BLEEDING-EDGE ATTACK RESPONSE IRC – Private message on non-std port”; flow: to_server,established; dsize: <128; content:”PRIVMSG “; nocase; offset: 0; depth: 8; tag: session,300,seconds; classtype: trojan-activity; sid: 2000347; rev:5; )
Ok let describe this rules. (OK I wont dwell into RTN-Rule Tree Node and OTN -Option tree node. Just a simple description).
The Rule Header
alert tcp $HOME_NET any -> $EXTERNAL_NET !6661:6668 -
any traffic using tcp from home_net at any port towards external network (internet la) but not port 6661 to port 6668 will trigger the alert. Ok not yet trigger the alert as this is only the alert header, now let see the Rule Option;
The Rule Option
(msg: “BLEEDING-EDGE ATTACK RESPONSE IRC – Private message on non-std port”; flow: to_server,established; dsize: <128; content:”PRIVMSG “; nocase; offset: 0; depth: 8; tag: session,300,seconds; classtype: trojan-activity; sid: 2000347; rev:5; )
msg: “BLEEDING-EDGE ATTACK RESPONSE IRC – Private message on non-std port <– this is the alert message
flow: to_server,established <– obvious. Established connection to server.
dsize: <128 <– payload size is less than 128 bytes
content:”PRIVMSG “; nocase <— content of the payloads that triggers the alert. Case insensitive
offset: 0 <– snort will start looking at 1st bytes.
depth: 8 <– snort will look into till 8 bytes of the payload
tag: session,300,seconds <– tag tag the session that triggers the alert for 300 seconds.
Meaning alert of this rule will be triggered when PRIVMSG or privmsg detected within 1st 8bytes of the tcp traffic payload which did not exceed 128 bytes from any source and port defined in the HOME_NET to internet at any port besides 6661 to 6668. And the traffic will be logged for 300 seconds.
And when I execute netstat at my lappy,
TCP Slackers:2208 anthony.freenode.net:6667 ESTABLISHED
TCP Slackers:2218 pool.webmaster.webchat.org:7000 ESTABLISHED
That’s why my chat traffics at webchat always trigger the alert but not my freenode traffic.