Community discussions

MikroTik App
 
merarischroeder
just joined
Topic Author
Posts: 4
Joined: Tue Feb 12, 2013 4:01 am

Security Issue - FTP port accessible with crafted packets

Tue Feb 12, 2013 8:28 am

RB2011UAS-2HnD
v5.21

I noticed this message in the Log screen (winbox):
"system error critical login failure for user Administrador from 114.207.246.138 via ftp"

Being an IP address in south korea (geoip) (Hi, yes I'm working on blocking you out), it's not me (being in Australia).

These messages were coming through frequently - close to one every second. Suspecting that they are trying to brute force guess the password, I:
* Disabled the FTP service through IP > Services
* Adding chain=forward action=drop (on their IP address)

Neither of these worked.

I mirrored the traffic from my WAN to my PC and looked at the traffic in Wireshark. I tried to FTP from an external IP, but it didn't work, however I compared the packets between myself and the attacker, and they appear to have spoofed the windowing parameters at the TCP level, having a high sequence number (although it is possible that this is just a natural number, since they have been trying for a while). Either way, I suspect that differences in their packets have allowed access.

Another possibility is that their TCP session was created before my firewall rule and disabling of ftp, and the router is allowing the pre-established session.

Furthermore, another attack from a chinese IP began, attacking the SSH port (I don't know why mikrotik enables these ports externally by default). I simply disabled SSH through IP > Services. Instant result - no more attacks.

So it would seem this is FTP specific. Any help configuration or support would be great (no South-Korean I don't want your help). I'm happy to provide full packets I have captured via wireshark etc..
 
merarischroeder
just joined
Topic Author
Posts: 4
Joined: Tue Feb 12, 2013 4:01 am

Re: Security Issue - FTP port accessible with crafted packet

Tue Feb 12, 2013 8:43 am

Following the assumption that it was the pre-established connection which was remaining open, I:
* Restarted the router
* No more attempts were making it through.

Therefore I suggest that you:
* Update the FTP server to close the TCP connection after 3 failed attempts
* Include higher-level security features to automatically block IPs which try to connect to a set of ports (eg. {21 or SSH})

Thanks.
 
Fleury
just joined
Posts: 8
Joined: Sun Mar 31, 2013 2:47 pm

Re: Security Issue - FTP port accessible with crafted packet

Wed Apr 10, 2013 1:57 am

Hi, i also got the same problem These messages were coming through frequently(see attached picture) its an IP from china and after i disabled the ssh port now its fine i'm not seeing these errors
You do not have the required permissions to view the files attached to this post.
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Re: Security Issue - FTP port accessible with crafted packet

Wed Apr 10, 2013 4:18 pm

to avoid this all you have to do is block connections to your router (chain=input) on WAN interface. Also, setting /ip services address field will only allow connections from addresses set there
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7056
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: Security Issue - FTP port accessible with crafted packet

Wed Apr 10, 2013 4:23 pm

Wiki has a good example how to protect router from brute force attacks
http://wiki.mikrotik.com/wiki/Bruteforc ... P_%26_SSH)
 
User avatar
jp
Long time Member
Long time Member
Posts: 609
Joined: Wed Mar 02, 2005 5:06 am
Location: Maine
Contact:

Re: Security Issue - FTP port accessible with crafted packet

Wed Apr 10, 2013 6:52 pm

I have firewall rules for blocking by default.

RouterOS would do well to have a more secure default config. A block everything input rule would cover that. Then people could add their specific remote access allows. A wizard configuration option could make it easy to securely setup.

Juniper routers for example won't even forward traffic till you ask it to.
 
spire2z
Long time Member
Long time Member
Posts: 516
Joined: Mon Feb 14, 2005 2:48 am

Re: Security Issue - FTP port accessible with crafted packet

Thu Apr 11, 2013 12:39 am

I think the default firewall rules do block all input connections?

Who is online

Users browsing this forum: Ahrefs [Bot], clambert and 190 guests