LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-20-2009, 11:14 AM   #16
summersgone
LQ Newbie
 
Registered: Dec 2006
Posts: 29

Original Poster
Rep: Reputation: 15

Well,
I've just tried capturing packets which is sent to my honeypot host. I was using tshark to capture the packets , and i was simulating wuftpd 2.6.0 service on my honeyd host and I run the wuftpd 2.6.0 remote exploit on the attacker's host.
This is the packet captured (http://silenceisdefeat.com/~l41n/ta/log.txt) when I was launching the exploit :

Quote:
0.000000 fe:fd:c0:a8:01:42 -> Broadcast ARP Who has 192.168.1.67? Tell 192.168.1.66
0.043489 fe:fd:c0:a8:01:43 -> fe:fd:c0:a8:01:42 ARP 192.168.1.67 is at fe:fd:c0:a8:01:43
0.000182 192.168.1.66 -> 192.168.1.137 TCP 3749 > ftp [FIN, ACK] Seq=0 Ack=0 Win=5840 Len=0
0.032176 192.168.1.137 -> 192.168.1.66 TCP ftp > 3749 [RST] Seq=0 Len=0
1.967908 192.168.1.66 -> 192.168.1.137 TCP 3954 > ftp [SYN] Seq=0 Len=0 MSS=1460 TSV=206641 TSER=0 WS=1
1.970102 192.168.1.137 -> 192.168.1.66 TCP ftp > 3954 [SYN, ACK] Seq=0 Ack=1 Win=16430 Len=0 MSS=1460
1.971863 192.168.1.66 -> 192.168.1.137 TCP 3954 > ftp [ACK] Seq=1 Ack=1 Win=5840 Len=0
2.071551 192.168.1.137 -> 192.168.1.66 FTP Response: 220 localhost.localdomain. FTP server (Version wu-2.6.0(5) Wed May 20 11:51:25 EDT 2009) ready.
2.072890 192.168.1.66 -> 192.168.1.137 TCP 3954 > ftp [ACK] Seq=1 Ack=98 Win=5840 Len=0
2.080058 192.168.1.66 -> 192.168.1.137 FTP Request: USER ANONYMOUS
2.081984 192.168.1.137 -> 192.168.1.66 TCP ftp > 3954 [ACK] Seq=98 Ack=17 Win=16414 Len=0
2.330652 192.168.1.137 -> 192.168.1.66 FTP Response: 331 Guest login ok, send your complete e-mail address as a password.
2.334295 192.168.1.66 -> 192.168.1.137 FTP Request: PASS \220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220 \220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220 \220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220 \220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220 \220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220 \220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220 \220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220 \220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220 \220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220 \220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220 \220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220 \220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220 \220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220\220 \220\2201\300PPP\260~\315\2001\3331\300CCSKSS\260Z\315\200\353w^1\300\215^\001\210F\004fh\377\377\00 1SS\260\210\315\2001\300\215^\001SS\260=\315\2001\3001\333\215^\b\211C\0021\311\376\3111\300\215^\bS S\260\f\315\200\376\311u\3611\300\210F\t\215^\bSS\260=\315\200\376\016\2600\376\310\210F\0041\300\21 0F\a\211v\b\211F\f\211\363\215N\b\215V\fRQSS\260;\315\2001\3001\333SS\260\001\315\200\350\204\377\37 7\377\377\377\3770bin0sh1..11venglin
2.335162 192.168.1.137 -> 192.168.1.66 TCP ftp > 3954 [ACK] Seq=168 Ack=523 Win=15924 Len=0
2.561078 192.168.1.137 -> 192.168.1.66 FTP Response: 230-Hello User at ,
2.562235 192.168.1.137 -> 192.168.1.66 FTP Response: 230-we have 911 users (max 1800) logged in in your class at the moment.
2.563376 192.168.1.137 -> 192.168.1.66 FTP Response: 230-Local time is: Wed May 20 11:51:25 EDT 2009
2.571050 192.168.1.137 -> 192.168.1.66 FTP Response: 230-All transfers are logged. If you don't like this, disconnect now.
2.571077 192.168.1.137 -> 192.168.1.66 FTP Response: 230-
2.571088 192.168.1.137 -> 192.168.1.66 FTP Response: 230-tar-on-the-fly and gzip-on-the-fly are implemented; to get a whole
2.571099 192.168.1.137 -> 192.168.1.66 FTP Response: 230-directory "foo", "get foo.tar" or "get foo.tar.gz" may be used.
2.571111 192.168.1.137 -> 192.168.1.66 FTP Response: 230-Please use gzip-on-the-fly only if you need it; most files already
2.571122 192.168.1.137 -> 192.168.1.66 FTP Response: 230-are compressed, and I will kill your processes if you waste my
2.571133 192.168.1.137 -> 192.168.1.66 FTP Response: 230-ressour
2.571144 192.168.1.137 -> 192.168.1.66 FTP Response: ces.
2.571155 192.168.1.137 -> 192.168.1.66 FTP Response: 230-
2.571166 192.168.1.137 -> 192.168.1.66 FTP Response: 230-The command "site exec locate pattern" will create a list of all
2.571177 192.168.1.137 -> 192.168.1.66 FTP Response: 230-path names containing "pattern".
2.573032 192.168.1.66 -> 192.168.1.137 TCP 3954 > ftp [ACK] Seq=523 Ack=762 Win=5840 Len=0
2.620150 192.168.1.66 -> 192.168.1.137 TCP 3954 > ftp [ACK] Seq=523 Ack=800 Win=5840 Len=0
3.651774 192.168.1.137 -> 192.168.1.66 FTP Response: 230-
3.653009 192.168.1.66 -> 192.168.1.137 TCP 3954 > ftp [ACK] Seq=523 Ack=854 Win=5840 Len=0
5.051493 fe:fd:c0:a8:01:43 -> fe:fd:c0:a8:01:42 ARP Who has 192.168.1.66? Tell 192.168.1.67
5.052786 fe:fd:c0:a8:01:42 -> fe:fd:c0:a8:01:43 ARP 192.168.1.66 is at fe:fd:c0:a8:01:42
5.676289 192.168.1.66 -> 192.168.1.137 FTP Request: site exec xx\274\306\277\277%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f% .f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%. f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f %.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f%.f% .f%.f%.f%.f%.f%d%c%c%.f|%p
5.677273 192.168.1.137 -> 192.168.1.66 TCP ftp > 3954 [ACK] Seq=854 Ack=949 Win=16004 Len=0
5.791002 192.168.1.137 -> 192.168.1.66 FTP Response: 500 'site': command not understood.
5.792187 192.168.1.66 -> 192.168.1.137 TCP 3954 > ftp [ACK] Seq=949 Ack=891 Win=5840 Len=0

===================================================================
IO Statistics
Interval: 1.000 secs
Column #0: ip.addr==192.168.1.137
| Column #0
Time |frames| bytes
000.000-001.000 2 108
001.000-002.000 3 186
002.000-003.000 23 2563
003.000-004.000 2 162
004.000-005.000 0 0
005.000-006.000 4 679
===================================================================
If being compared to the captured packet of wuftpd 2.6.0 exploit which I found on http://www.inguardians.com/research/docs/sigs.pdf , it looks similar (but I still want to know your opinion bout it) :

Quote:
23:54:56.583689 192.168.1.40.5247 > 192.168.1.120.21: P 36557:37068(511) ack
69467 win 33232 <nop,no
p,timestamp 14407154 900325> (DF)
0x0000 4500 0233 4915 4000 4006 6bbf c0a8 0128 E..3I.@.@.k....(
0x0010 c0a8 0178 147f 0015 cbf0 f49a 1ea7 f50a ...x............
0x0020 8018 81d0 9989 0000 0101 080a 00db d5f2 ................
0x0030 000d bce5 5349 5445 2045 5845 4320 3720 ....SITE.EXEC.7.
0x0040 fccb ffff bf50 7350 73fd cbff ffbf 5073 .....PsPs.....Ps
0x0050 5073 fecb ffff bf50 7350 73ff ffcb ffff Ps.....PsPs.....
0x0060 bf25 2e66 252e 6625 2e66 252e 6625 2e66 .%.f%.f%.f%.f%.f
0x0070 252e 6625 2e66 252e 6625 2e66 252e 6625 %.f%.f%.f%.f%.f%
0x0080 2e66 252e 6625 2e66 252e 6625 2e66 252e .f%.f%.f%.f%.f%.
0x0090 6625 2e66 252e 6625 2e66 252e 6625 2e66 f%.f%.f%.f%.f%.f
0x00a0 252e 6625 2e66 252e 6625 2e66 252e 6625 %.f%.f%.f%.f%.f%
0x00b0 2e66 252e 6625 2e66 252e 6625 2e66 252e .f%.f%.f%.f%.f%.
0x00c0 6625 2e66 252e 6625 2e66 252e 6625 2e66 f%.f%.f%.f%.f%.f
0x00d0 252e 6625 2e66 252e 6625 2e66 252e 6625 %.f%.f%.f%.f%.f%
And what I got in my honeycomb.log was still:

Quote:
alert tcp any 0 -> any 0 (msg: "Honeycomb Tue May 19 03h06m46 2009 "; ip_proto: "ip"; flags: F+; flow: stateless; )
alert tcp any 0 -> any 0 (msg: "Honeycomb Tue May 19 03h06m46 2009 "; ip_proto: "ip"; flags: FPA1; flow: stateless;
I still can't find any problem why i couldn't generate any signatures here..
Please give me your opinion about this approach
Thanks a lot..
 
Old 05-21-2009, 07:14 AM   #17
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Hmm, no comments on your approach except with known exploits I'd strongly suggest using known signatures for checking. I mean that's way easier, isn't it? And maybe it would be an idea to research about other other automagical rule generation efforts? For instance Honeytrap with the Nebula plugin might be interesting once you get the source to work.
 
Old 05-21-2009, 11:06 PM   #18
summersgone
LQ Newbie
 
Registered: Dec 2006
Posts: 29

Original Poster
Rep: Reputation: 15
hmmm..
seems like I hardly found honeytrap+nebula integration documentations on the net..
 
Old 05-22-2009, 03:54 AM   #19
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Nebula is at Sourceforge and Honeytrap at SVN at carnivore.it. Basically you just build Honeytrap --with-plugin-nebula (or like that), configure the plugin in honeytrap.conf and build Nebula.
 
Old 05-22-2009, 09:34 PM   #20
summersgone
LQ Newbie
 
Registered: Dec 2006
Posts: 29

Original Poster
Rep: Reputation: 15
successfully installed both honeytrap and nebulla . succesfully loaded nebulla plugin from the honeytrap , but still got no snort signatures generated ..
Have you tried them out ?
 
Old 05-23-2009, 09:15 AM   #21
summersgone
LQ Newbie
 
Registered: Dec 2006
Posts: 29

Original Poster
Rep: Reputation: 15
well , now I am able to generate snort signature from honeytrap and nebula
Thanks a lot , unSpawn !
 
Old 05-23-2009, 06:04 PM   #22
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
It's good to hear you finally were able to.
Could you post details like configuration and such?
It will help those that find this thread later on.

Last edited by unSpawn; 05-23-2009 at 06:05 PM.
 
Old 05-24-2009, 04:31 AM   #23
summersgone
LQ Newbie
 
Registered: Dec 2006
Posts: 29

Original Poster
Rep: Reputation: 15
sure thing!

Installation steps :

1.
//installing nebula
# tar -jxvf nebula-0.2.3.tar.bz2
# cd nebula-0.2.3/
# ./configure --prefix=/opt/nebula
# make && make install

2.
//installing honeytrap

# svn co https://svn.carnivore.it/honeytrap/trunk/ honeytrap-svn
# cd honeytrap-svn
# autoreconf -i
# ./configure --prefix=/opt/honeytrap --with-stream-mon=nfq --with-submit-nebula
# make && make install
# iptables -A INPUT -i eth0 -p tcp --syn -m state --state NEW -j NFQUEUE


=integrating nebula plugin to honeytrap.conf :

/* submitNebula settings */
plugin-submitNebula = {
host = “localhost”
port = “4712″
secret = “secretpassword”
}

=running both nebula and honeytrap :

# nebula -a /tmp/snort.rules -c 10 -t 2 -s secretpassword 1>/tmp/nebula.log

# honeytrap -C /opt/honeytrap/etc/honeytrap/honeytrap.conf

-c = is a percentage (0 to 100) of similarity that should be met by the data to be put in a cluster. The similarity gives you control on how strict you want to be when clustering data.
-t = tells nebula when it should start creating a signature. The idea here is that you don't want signatures that are based on a small amount of source data. Higher amounts of source data produce better signatures.

Then , start testing by executing some exploits againsts the honeytrap host , then you should see some signatures are being generated

More refrences :

http://glasblog.1durch0.de/?p=139
 
Old 05-24-2009, 05:05 AM   #24
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Thanks for posting. Two questions if I may. Why did you choose nfq in --with-stream-mon= over pcap? And can you say anything wrt the "quality" of the sigs? Does it come close to your original objective?
 
Old 05-24-2009, 05:58 AM   #25
summersgone
LQ Newbie
 
Registered: Dec 2006
Posts: 29

Original Poster
Rep: Reputation: 15
you should set the value of -t and -c higher to get better signs , I was using the lower value , just only to make sure if the plugin works or not (and to get some quick signs) . since i'm not familiar with snort signs yet , i can't say if it's close to the objective or not
well , in fact you can use either both pcap or nfq , since i only got netfilter_queue installed on my host I decided to use it as a test.
thanx
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Sun releases Honeycomb under BSD licence LXer Syndicated Linux News 0 04-19-2008 12:12 AM
Incorrect double click on occasion when using a USB mouse arobinson74 Linux - Hardware 1 02-02-2006 11:55 PM
On occasion my screen goes black??? darkone66669 Linux - Hardware 9 04-26-2004 06:57 PM
System hangs on occasion, especially downloading stuff TravisOSF Mandriva 5 04-03-2004 04:13 PM
Snort, P2P, devise signatures RobK Linux - Security 1 01-15-2004 12:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration