Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
Due to network maintenance being performed by our provider, LQ will be down starting at 05:01 AM UTC. The exact duration of the downtime isn't currently known. We apologize for the inconvenience.
|
 |
|
12-13-2012, 10:13 AM
|
#16
|
|
Moderator
Registered: May 2001
Posts: 24,805
|
It took me a while to notice there's no HTTP method involved, so these aren't valid HTTP requests (=clients?) to begin with.
Quote:
Originally Posted by mitusf
just in case someone wants to make an ideea
|
Do you plan to enable iptables logging and capture packets as well?
|
|
|
|
12-13-2012, 11:04 AM
|
#17
|
|
Member
Registered: Nov 2011
Location: Bucharest, Romania
Distribution: Slackware
Posts: 141
Original Poster
Rep:
|
Yes, but first I must see how to do it (the firewall logging), I have not any ideea so far, and with Wireshark, I suppose I must let the computer working for days, until I "receive" the custom salute from the outsiders.
Ah, ok, it's the LOG target, but where it is the info logged?
I think that without being set up (iptables log in syslogd and logrotate) it is logged by dmesg but within it's limits, I think. So, I must learn how to set up loging of iptables in syslogd and then logrotate. Maybe I am wrong but this is what I think.
BRW, is it appropriate or enough to see the current connections to my computer with "netstat -aut", or I need more options here?
Last edited by unSpawn; 12-13-2012 at 11:24 AM.
Reason: //Merge, NN
|
|
|
|
12-13-2012, 11:23 AM
|
#18
|
|
Moderator
Registered: May 2001
Posts: 24,805
|
'man iptables':
Code:
LOG
Turn on kernel logging of matching packets. When this option is set for a rule, the Linux kernel
will print some information on all matching packets (like most IP header fields) via the kernel
log (where it can be read with dmesg or syslogd(8)). This is a "non-terminating target", i.e. rule
traversal continues at the next rule. So if you want to LOG the packets you refuse, use two sepa-
rate rules with the same matching criteria, first using target LOG then DROP (or REJECT).
Quote:
Originally Posted by mitusf
Maybe I am wrong but this is what I think.
|
After thinking and before posting it would be good to consult your documentation. What you wrote about only concerns you if you don't run syslogd and don't run a logrotate cron job.
Quote:
Originally Posted by mitusf
is it appropriate or enough to see the current connections to my computer with "netstat -aut", or I need more options here?
|
Fastest way to display nfo with (networking) tool is to avoid any resolving. Often (ls, lsof, netstat, iptables, tcpdump, etc, etc) applications have "-n" switch for that. BTW, why would we need to see 'netstat' output?
Last edited by unSpawn; 12-13-2012 at 11:31 AM.
Reason: //More *is* more
|
|
|
1 members found this post helpful.
|
12-13-2012, 11:49 AM
|
#19
|
|
Member
Registered: Nov 2011
Location: Bucharest, Romania
Distribution: Slackware
Posts: 141
Original Poster
Rep:
|
I was thinking about the possibility that someone intruded and with netstat I can see it's connection... not started by me, of course... make an ideea of what he is doing.
You're right about reading the documentation first. Sorry about that hurry.
Last edited by mitusf; 12-13-2012 at 12:07 PM.
|
|
|
|
12-13-2012, 12:15 PM
|
#20
|
|
Moderator
Registered: May 2001
Posts: 24,805
|
Quote:
Originally Posted by mitusf
I was thinking about the possibility that someone intruded and with netstat I can see it's connection... not started by me, of course... make an ideea of what he is doing.
|
Do you have a gut feeling, suspicion or clue your machine may be compromised?
|
|
|
|
12-13-2012, 12:20 PM
|
#21
|
|
Member
Registered: Nov 2011
Location: Bucharest, Romania
Distribution: Slackware
Posts: 141
Original Poster
Rep:
|
Sincerely, I hope and I don't really believe that was compromised, but I think these were only tries to break in. This is my feeling, after a behavior analyze of the "attacks" in the server log, without knowing the server's internals.
|
|
|
|
12-13-2012, 01:22 PM
|
#22
|
|
Moderator
Registered: May 2001
Posts: 24,805
|
Then lets stick with logging web server requests, firewall connections and capturing packets with
Code:
tcpdump -n -nn -s 0 -i eth[devicenumber] -w /path/to/dump.pcap 'tcp-syn != 0 and dst port 80'
' for now?
|
|
|
1 members found this post helpful.
|
12-13-2012, 01:27 PM
|
#23
|
|
Member
Registered: Nov 2011
Location: Bucharest, Romania
Distribution: Slackware
Posts: 141
Original Poster
Rep:
|
Here is another fresh log record:
Do you know what happend? I have read that code 200 means that something was delivered, but what? I don't get it.
Your command seems a litle too complicated for me right now. Maybe later I would be able to decode it.
Update: the IP is from Rusia
Last edited by mitusf; 12-13-2012 at 01:29 PM.
|
|
|
|
12-14-2012, 05:36 PM
|
#24
|
|
Member
Registered: Nov 2011
Location: Bucharest, Romania
Distribution: Slackware
Posts: 141
Original Poster
Rep:
|
unSpawn, thank you for your answer, it was really interesting, though I need more studying about the syntax call of tcpdump. Also, what means the -nn flag, I didn't find it in the man page, maybe I should try with info?
|
|
|
|
12-14-2012, 09:00 PM
|
#25
|
|
Moderator
Registered: May 2001
Posts: 24,805
|
-nn Don't convert protocol and port numbers etc. to names either.
Come to think of it just
tcpdump -s 0 -i eth[devicenumber] -w /path/to/dump.pcap 'tcp-syn != 0 and dst port 80'
should do because you're logging to file.
Last edited by unSpawn; 12-14-2012 at 09:02 PM.
|
|
|
1 members found this post helpful.
|
12-15-2012, 04:30 AM
|
#26
|
|
Member
Registered: Nov 2011
Location: Bucharest, Romania
Distribution: Slackware
Posts: 141
Original Poster
Rep:
|
Quote:
Originally Posted by OlRoy
Seeing logs that contain hex and some printable ascii characters, makes me think binary data, and possibly shellcode.
213.215.89.201 - - [03/Dec/2012:21:28:50 +0200] "\xeb\xe1,\xdf\x89\xd4E\xb4\xea" 501 207
Code:
$ rasm2 -d 'eb e1 2c df 89 d4 45 b4 ea'
jmp 0x8047fe3
sub al, 0xdf
mov esp, edx
inc ebp
mov ah, 0xea
I'm definitely not familiar enough with Linux shellcode to say whether that is part of valid shellcode, but the above are all very common instructions. As unSpawn was saying, it's hard to say much without more context...
|
Thank you very much OlRoy, your response opened to me a totally new and interesting perspective. Thanks!
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:01 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|