LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-07-2005, 09:52 AM   #1
int0x80
Member
 
Registered: Sep 2002
Posts: 310

Rep: Reputation: Disabled
Sniffing out a 0-day exploit


I have an internet-facing server with a 2.6 kernel patched with PaX/grsecurity. Occassionally, there is a PaX hit from SSH. Here are two of the latest (from dmesg):

PAX: execution attempt in: /lib/libgcc_s.so.1, 28c4f000-28c57000 00000000
PAX: terminating task: /usr/sbin/sshd(sshd):4071, uid/euid: 0/0, PC: 28c52e6e, SP: 28c4925c
PAX: bytes at PC: 66 81 38 58 b8 0f 84 2e 01 00 00 80 38 b8 75 09 81 78 01 ad
PAX: bytes at SP: 28c4939c 28c49374 281670cd 28c57914 28c492ac 28c4939c 00000000 28c492ac 28c4939c 0000000a 28c49bb0 28c57914 00000000 28c4939c 28c49374 28c53830 28c492ac 28c49b04 281670a0 28c49dd0

PAX: execution attempt in: /lib/libgcc_s.so.1, 28c4f000-28c57000 00000000
PAX: terminating task: /usr/sbin/sshd(sshd):16912, uid/euid: 0/0, PC: 28c52e6e, SP: 28c4925c
PAX: bytes at PC: 66 81 38 58 b8 0f 84 2e 01 00 00 80 38 b8 75 09 81 78 01 ad
PAX: bytes at SP: 28c4939c 28c49374 281670cd 28c57914 28c492ac 28c4939c 00000000 28c492ac 28c4939c 0000000a 28c49bb0 28c57914 00000000 28c4939c 28c49374 28c53830 28c492ac 28c49b04 281670a0 28c49dd0

The installed OpenSSH version is 3.8.1p1-8. I am interested in seeing what specific bytes are coming across that blow up the sshd. Of course if I tcpdump with dst port 22, all of the traffic is encrypted, and I cannot see the actual data. Is there some other method, or approach that can be used to detect the actual bytes coming across?

As an aside, I do get a fair amount of SSH brute force attempts (like the ones mentioned in Capt Caveman's ssh login attempts thread). However, SSH blows up on PaX maybe once a month. I'm fairly certain based on a comparison of the attack frequencies that the two are unrelated. This may not be the case, and that's why I added this aside.
 
Old 06-07-2005, 12:57 PM   #2
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
You might want to consider installing Sebek which can sniff SSH connections. I believe ettercap can do live SSH decryption as well. Following the sshd process itself with strace -f would probably be really informative, but if you're only seeing this once per month, then you'd log an absolutely enormous amount of info.

Do you get any errors relating to sshd itself, like a panic or the daemon dies?
 
Old 06-07-2005, 01:45 PM   #3
int0x80
Member
 
Registered: Sep 2002
Posts: 310

Original Poster
Rep: Reputation: Disabled
Haven't heard of Sebek (although I have heard of Honeynet), good suggestion. I thought ettercap could only sniff SSH1, but not SSH2? Good idea on the strace -f. Perhaps I could write a utility to rotate the data recorded from strace so that the storage would become a non-issue.

The sshd doesn't die or throw any errors or panic when this happens (other than the PaX messages). All other entries in the logs are normal system activity of other applications operating on the system.

Thanks for the response.
 
Old 06-07-2005, 08:08 PM   #4
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Just to rule out a false positive, if you stop and then restart the sshd service, does that generate a warning?
 
Old 06-08-2005, 03:15 PM   #5
int0x80
Member
 
Registered: Sep 2002
Posts: 310

Original Poster
Rep: Reputation: Disabled
No PaX hits from stopping and restarting. The new OpenSSH came down in Debian yesterday (4.1p1-3). Hopefully this will fix the vulnerabilit(y|ies) that allowed SSH to get blown up. Thanks for the suggestions and links Capt_Caveman. If the PaX hits continue, I'll let you know what steps I take for countermeasures.
 
Old 06-08-2005, 03:51 PM   #6
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Definitely keep us informed with any new info. It would be a little more clear if this was a "return to libc" attack, but libgcc is odd. You may want to post this to the PaX and openSSH mailing lists as well.
 
  


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
What applications do you use day to day? alan_h404 General 11 10-16-2005 07:09 AM
Why not use Astaro as a normal day to day desktop?? chutsu Linux - General 1 10-08-2005 11:42 PM
What exploit is this? Boss Hoss Linux - Security 6 06-11-2004 06:16 PM
IP Sniffing, how? shrike_912 Slackware - Installation 1 06-06-2004 05:36 PM
|more exploit Benamoz Linux - General 3 09-03-2003 04:59 AM

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

All times are GMT -5. The time now is 11:32 AM.

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