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 01-19-2005, 11:24 AM   #1
mnauta
Member
 
Registered: Apr 2003
Posts: 152

Rep: Reputation: Disabled
how to stop this


This keeps showing up in my log watch. What is the best way to stop this? I have all software uptodates, I run rkhunter, I block certain address ranges in httpd.conf

Connection attempts using mod_proxy:
220.135.202.80 -> msa-mx2.hinet.net:25 : 2 Time(s)
220.136.167.91 -> ms58.hinet.net:25 : 32 Time(s)
220.136.171.148 -> msa.hinet.net:25 : 6 Time(s)
220.136.178.15 -> msa.hinet.net:25 : 12 Time(s)
220.136.179.205 -> ms1.hinet.net:25 : 36 Time(s)
220.136.179.205 -> msa.hinet.net:25 : 54 Time(s)
220.136.179.218 -> msa.hinet.net:25 : 46 Time(s)


Also, how about this, it is probably eating up resources (this goes on for pages in the log)

205.238.243.71 - - [16/Jan/2005:08:02:59 -0600] "SEARCH /\x90\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9
\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc
9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\x
c9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\
xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\
xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9\xc9

Last edited by mnauta; 01-19-2005 at 11:53 AM.
 
Old 01-19-2005, 12:45 PM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
I don't know about the first, but the second part looks very much like a buffer overflow attack. Someone's trying (or tried) to break into your system. Whether or not they have actually succeeded, I don't know.

Dave
 
Old 01-19-2005, 03:19 PM   #3
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
Based on Capt.Caveman's response in this thread , the first one may be a spammer looking for a proxy to relay mail. I'd have a look in your Apache logs and as long as these attempts show up with 405, the attempt has failed. The second one is definitely an IIS exploit that can't affect a linux box. Get used to those because there seem to be a TON of infected IIS boxes out there. I know I see them all the time.
 
Old 01-21-2005, 07:53 AM   #4
mnauta
Member
 
Registered: Apr 2003
Posts: 152

Original Poster
Rep: Reputation: Disabled
This is from the log, I guess it's making a connection.

"CONNECT msa.hinet.net:25 HTTP/1.0" 200 8059 "-" "-"

Also, I did nmap on this server (from within the network) and port 25 is not open.

My PIX fire wall is routes all port 25 traffic to another server, how does this get to my web server anyway? Also, it keeps going on, every day the logs show this.

manuel

Last edited by mnauta; 01-21-2005 at 07:59 AM.
 
Old 01-21-2005, 08:49 AM   #5
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
I'm guessing based on what I read here, so hopefully one of the real experts will chime in.......

Quote:
Also, it keeps going on, every day the logs show this.
Well, if this is a spammer, that isn't surprising. They are using your box to cover their tracks and will probably continue to do so until you stop them. You might want to read through this thread for a discussion on modifying Apache to not allow this.
 
Old 01-21-2005, 09:10 AM   #6
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
My PIX fire wall is routes all port 25 traffic to another server, how does this get to my web server anyway?

It's a proxy attempt, so it's trying to use your webserver to pass requests to the host 'msa.hinet.net'. The initial request to your webserver is still on port 80, but it then gets your webserver to connect to port 25 of the remote host. Usually the proxy feature is disabled by default for this very reason (not many people need it and it is highly abusable). See the link Hangdog posted on turning mod_proxy off. You can also use mod_rewrite to drop requests that use the CONNECT method.

Also how big is the size of your index.html file?
 
Old 01-21-2005, 10:08 AM   #7
mnauta
Member
 
Registered: Apr 2003
Posts: 152

Original Poster
Rep: Reputation: Disabled
Thanks, this helps alot!

I'll check on the size of the index file, I know it is small (what is significnace of that with regard to this issue???)
 
Old 01-21-2005, 11:59 PM   #8
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Some systems will return the default home page (index.html) to someone making invalid proxy requests. So a '200' status code is returned even though the proxy was unsuccessful. Though I don't believe that is the case here. If I remeber correctly, FC and Redhat should return a 405 for someone using the CONNECT method, unless the request is allowed for some reason. So do you have mod_proxy turned on for some reason? Might help if you posted your http.conf file.
 
Old 01-22-2005, 01:22 PM   #9
mnauta
Member
 
Registered: Apr 2003
Posts: 152

Original Poster
Rep: Reputation: Disabled
I recall trying it, and it did give me the html from the index page.
 
Old 01-22-2005, 05:50 PM   #10
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
If that's the case, then each connection attempt in the log should show the exact same number of bytes transfered (8059), otherwise the proxy attempts were successfull.
 
Old 01-23-2005, 02:08 AM   #11
mnauta
Member
 
Registered: Apr 2003
Posts: 152

Original Poster
Rep: Reputation: Disabled
Here is one of the lines of the log:


220.136.163.212 - - [16/Jan/2005:21:02:49 -0600] "CONNECT msa.hinet.net:25 HTTP/1.0" 200 8059 "-" "-"


Looks like they are not successfull.

Thanks
Manuel
 
Old 01-23-2005, 10:52 AM   #12
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
As long as ALL of the CONNECT attempts show 8059 bytes transfered and that is the size of your index.html. Please verify that all of those are correct, otherwise you may be relaying spam.
 
Old 01-26-2005, 02:27 PM   #13
mnauta
Member
 
Registered: Apr 2003
Posts: 152

Original Poster
Rep: Reputation: Disabled
Is this the correct syntax to stop the CONNECT

<Limit CONNECT>
Order Deny, Allow
Deny from all
</Limit>
 
Old 01-28-2005, 12:37 AM   #14
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
The Limit directive is a little picky. I actually use mod_rewrite:

RewriteEngine on
ReWriteCond %{REQUEST_METHOD} ^(TRACE|CONNECT)
ReWriteRule .* - [F]

Though it's redundant. You need to have the proxy container uncommented and specifically have ProxyRequests set to "On" AND you need to have the port open with the ProxyCONNECT directive. So it's not something you can easily turn on by mistake. I'm not aware of any distro that allow the CONNECT method by default.
 
  


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
How do I stop services from restarting after I stop them? M$ISBS Linux - Software 3 10-27-2005 08:13 PM
why won't named stop?? jillu Linux - Networking 4 09-13-2004 09:22 PM
how can i stop Ammad Linux - Security 2 04-30-2004 10:44 AM
How do I stop X? darkone66669 Linux - Software 4 03-25-2004 06:22 PM
Stop Sign! ezra143 General 6 08-19-2003 08:28 AM

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

All times are GMT -5. The time now is 05:22 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