Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | [Snort-users] using snort to monitor smb/ldap/radius login success/failure |
|---|---|
| Date: | Wed, 31 Jan 2007 15:14:29 -0500 |
Hi Group, I need to develop a tool to monitor smb/ldap/radius login
success/failure. My initial approach is through wireshark (tshark) +
perl parsing. I have limited success using this approach with NTLM/SMB
login. But it seems to me this kind of connection tracking/sniffing must
be possible with existing technology. Can snort be used for this
purpose? Would someone be kind enough to demonstrate how it's possible
to use snort rules to record login SMB success/failure?
Thanks,
Fei
Here is what I do to track SMB login failure/success with perl parsing
tshark output:
while(<$tshark>){
my $line = $_;
if($line =~ m|^Frame\s+(\d+)|){
# print Dumper(\%pkt);
$pkt{frame} = $1;
}
if ($line =~ m|^Internet Protocol, Src: (.*?), Dst: (.*)$|){
$pkt{ip}{src} = $1;
$pkt{ip}{dst} = $2;
}
if($line =~ m|^Transmission Control Protocol, Src Port:
(\d+).*?Dst Port: (\d+).*?Seq: (\d+), Ack: (\d+), Len: (\d+)$|){
$pkt{ip}{tcp}{sport} = $1;
$pkt{ip}{tcp}{dport} = $2;
$pkt{ip}{tcp}{seq} = $3;
$pkt{ip}{tcp}{ack_seq} = $4;
$pkt{ip}{tcp}{len} = $5;
next if($5 == 0);
foreach (keys %sessions){
$user = $_;
if($sessions{$user}{token} &&
($sessions{$user}{seq} == $pkt{ip}{tcp}{seq}) ){
print "Found response pkt\n";
$sessions{$user}{resp} = 1;
}else{
$sessions{$user}{resp} = 0;
}
}
}
if($line =~ m|^\s+User name: (.*)$|){
$user = $1;
$sessions{$user}{seq} = $pkt{ip}{tcp}{ack_seq};
$sessions{$user}{token} = 1;
print "Found request pkt\n";
}
if($line =~ m|^\s+NT Status: STATUS_SUCCESS|){
foreach (keys %sessions){
if($sessions{$_}{resp}){
print "User $_ login through smb
is successful\n";
}
}
}
if($line =~ m|^\s+NT Status: STATUS_LOGON_FAILURE|){
foreach (keys %sessions){
if($sessions{$_}{resp}){
print "User $_ login through smb
failed\n";
}
}
}
}
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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://www.geocrawler.com/redir-sf.php3?list=snort-users
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [Snort-users] Phil Wood Libpcap Installation Problems, Gentoo-Wally |
|---|---|
| Next by Date: | Re: [Snort-users] Dynamic Preprocessor Errors, info+lucretia.ca |
| Previous by Thread: | [Snort-users] 0.0.0.0 addresses, antalsia |
| Indexes: | [Date] [Thread] [Top] [All Lists] |