Snort mailing list archives

Re: Alerting on internal TCP connection attemptsto non-existent services or hosts . .


From: "Jonathan Heard" <jonathan.heard () qassociates co uk>
Date: Thu, 5 Dec 2013 11:18:34 -0000

Hi All,
   Before I forget - I just wanted to say thank you for your helpful responses!

I've now resolved my problem which was ultimately related to the checksum preprocessor. I didn't realise that snort 
discards packets with bad checksums if checking is enabled and I'm seeing a fairly consistent 43% of all packets having 
bad sums. This would normally be worrying to me, but in the heavily virtualised environment I'm working in - it appears 
to be normal so I'm happy to run snort with checksums being ignored for the time being.

Many thanks
Jonathan


-----Original Message-----
From: Stark, Vernon L. [mailto:Vernon.Stark () jhuapl edu]
Sent: Tue 03/12/2013 21:59
To: James Lay; snort-users () lists sourceforge net
Subject: Re: [Snort-users] Alerting on internal TCP connection attemptsto       non-existent services or hosts .

We have good luck with rules that look for the SYN packet used to begin a TCP session.  So, you might try the following:

alert tcp any any -> any 3389 (sid:100000; msg:"RDP Detected"; flags:S; )

Vern
-----Original Message-----
From: James Lay [mailto:jlay () slave-tothe-box net]
Sent: Tuesday, December 03, 2013 4:51 PM
To: snort-users () lists sourceforge net
Subject: Re: [Snort-users] Alerting on internal TCP connection attempts to non-existent services or hosts .

On 2013-12-03 06:58, Jonathan Heard wrote:
Alerting on internal TCP connection attempts to non-existent services
or hosts

Hi All,
 I'm trying to configure snort in a closed network (i.e. no internet)
and I really want to be able to receive alerts if snort ever sees
particular types of connection on the wire, regardless of whether it
actually reaches a host. e.g. If someone so much as tries to establish
a telnet or ftp connection from an internal host to any ip address, I
want to know about it.

 Snort is running in passive mode and is receiving all traffic for
analysis via an ERSPAN session (i.e. snort is decoding almost 100% GRE
inbound). It's version "2.9.5.3 GRE (Build 132)" and I compiled it
myself from source using mainly the default config options.

 At present a rule such as:

 alert tcp any any -> any 3389 (sid:100000; msg:"RDP Detected";)

 ...only fires when I establish a successful TCP connection between
two hosts on the Monitored VLAN - This includes just using 'telnet
<ip_address> 3389'. However if I use the IP address of either a
non-existent server in the subnet, or a server which is not listening
on port 3389 then snort doesn't log any alerts for this rule :-(

 If I run 'snort -v' I can see the captured TCP packet leaving the
host which initiated the connection, so I know snort is seeing it -
But I cannot find a way to make it react.

 The packet is represented by snort -v as follows (with some info
redacted):
 <Date/Time> <SRC_IP>:58978 -> <DEST_IP>:3389  TCP TTL: 128 TOS:0x0
ID:XXXXX IpLen: 20 DgmLen:52 DF
 ******S* Seq: 0xXXXXXXXX Ack: 0x0 Win: 0x2000 TcpLen: 32  TCP Options
(6) => MSS: 1260 NOP WS: 8 NOP NOP SackOK

 I'm using the snort.conf which comes with the snort free subscription
ruleset - I've tried stripping it back to a very basic config with
most of the preprocessors and stock rules disabled but the behaviour
remains the same.

 Is it possible to achieve this and if so how please?

 Many Thanks in advance
 Jonathan

Wonder if something like the below would work:

alert tcp any 3389 -> any any (msg:"RDP RST Packet Detected"; flow:stateless; flags:RA+; sid:100000;)

This should alert on the reset packet sent from the machine that doesn't have 3389 open on it.

James

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://sourceforge.net/mailarchive/forum.php?forum_name=snort-users

Please visit http://blog.snort.org to stay current on all the latest Snort news!

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://sourceforge.net/mailarchive/forum.php?forum_name=snort-users

Please visit http://blog.snort.org to stay current on all the latest Snort news!


This message includes information that we consider will be prejudicial to our commercial interests if it is disclosed. 
If, pursuant to the provisions of the Freedom of Information Act 2000 (or any subordinate legislation or codes of 
practice), you receive any request to disclose and/or intend to disclose all or any of the Information you agree that 
you will consult with us before disclosing any such Information. In so consulting you will act reasonably and in good 
faith and will duly consider any representations we may make relating to the proposed disclosure or otherwise of such 
Information.

The information transmitted by this email is confidential and for the sole use of the intended recipient(s). If you are 
neither an intended recipient nor an employee or agent responsible for delivery to the intended recipient, you should 
be aware that any unauthorised review, use, disclosure or distribution is strictly prohibited.

If you have received this message in error please immediately contact the sender by return email and delete the 
original message and destroy all copies thereof.

Q Associates has taken every reasonable precaution to ensure that any attachment to this email has been checked for 
software viruses however the company cannot accept liability for any damages sustained as a result of a virus and would 
advise that you carry out your own virus checks before opening any attachment.
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://sourceforge.net/mailarchive/forum.php?forum_name=snort-users

Please visit http://blog.snort.org to stay current on all the latest Snort news!

Current thread: