6.38.5 came out in March 2017 so you really should be patched.vulnerability that affects MikroTik RouterOS firmware 6.38.4 and earlier, and which allows attackers to execute code and take over the device. This vulnerability, called "Chimay Red", was one of the flaws included in the WikiLeaks "Vault 7" leak of alleged CIA hacking tools, and has also been used to compromise MikroTik routers by changing hostnames of vulnerable devices in the past year.
What's new in 6.38.5 (2017-Mar-09 11:32):
!) www - fixed http server vulnerability;
/ip firewall filter
add action=tarpit chain=input comment="Add you ip addess to allow-ip in Address Lists." dst-port=30553 protocol=tcp
add action=add-src-to-address-list address-list=allow-ip address-list-timeout=1h chain=input comment="The security flaw for Hajime is closed by the firewall." packet-size=1083 protocol=icmp
add action=accept chain=input comment="Please update RotherOS and change password." src-address-list=allow-ip
add action=drop chain=input comment=" Thanks are accepted on WebMoney Z399578297824" dst-port=53 protocol=udp
add action=drop chain=input comment="or BTC 14qiYkk3nUgsdqQawiMLC1bUGDZWHowix1" dst-port=53,8728,8729,21,22,23,80,443,8291 protocol=tcp
add action=passthrough chain=input
/system note
set note="The security flaw for Hajime is closed by the firewall. Please update RotherOS. Gratitude is accepted on WebMoney Z399578297824 or BTC 14qiYkk3nUgsdqQawiMLC1bUGDZWHowix1"
This note came from a backup when the routerboard was infected, just a note . Be calm, the board is no longer infected.I had such kind of the invasion too.
And now i updated routerOS from 6.41 to 6.42.3. I changed all user's passwords and update my router from the backup which i had before the invasion.
But i find this string(screenshot) in the terminal window. What is it mean?
This note came from a backup when the routerboard was infected, just a note . Be calm, the board is no longer infected.I had such kind of the invasion too.
And now i updated routerOS from 6.41 to 6.42.3. I changed all user's passwords and update my router from the backup which i had before the invasion.
But i find this string(screenshot) in the terminal window. What is it mean?
/system note edit note
Delete the text and ctrl with o for saving the changes!
That's quite concerning -- you were hacked via the API while running a recent firmware (more recent than v6.38.5)?The compromised port and were the vulnerability get into my router was API 8728.
I got this because i'm checking dayly my routers, and the rules was placed 3 minutes before, and i got this in the log. the router that i have is a Lab router to catch this kind of issues:
This is what i get in my log before the script was uploaded. I log the mikrotik log into syslog server, that why i get this trace.
system, info, account user admin logged in from 37.193.69.238 via api
My admin password is 20 characters long and it contains alphanumeric characters, thats why is "impossible" to get Cracked.
I know this may sound silly but it is quite important to ask - except from password change mentioned by Msatter, did you reset/reviewed whole configuration? If you just updated your ROS, added few firewall rules and left rest of config intact, there might be anything hidden. Even this message might be actually just leftover from previous hack. It is hard to say, but if there is suspicion, that vulnerability is still open, would be good to think about every possible option.
Do you restored from .backup file not from configuration backup (.rsc file)?maybe it infected the backup file ?
Use the netinstall tool to install the newest version on the router and reset it to factory defaults.What else can I do to prevent this while I try and figure out why I can not update.
In fact I had all that way before it even became known that there were vulnerabilities. It is just standard practice to allow management only from trusted networks/addresses.So all that has to be disabled and you can only allow access from certain IPs; yes it has become a management nightmare
Thank you for your advice, i think i will use the default firewall and white-list some IP addresses.Please do NOT use the firewall posted above. It is incomplete, unnecessarily complex and will make the router at least vulnerable to DNS amplification attacks.
Use the default firewall from MikroTik's default configuration instead (with a default DROP rule on both input and forward chains for non-lan traffic).
That is basic firewall rule and you should have this in first place.I have disallowed unestablished connections and locked them down tight
In that case best course of action would be hiring networking professional, give him access to router and let him figure out what is happening.I cannot figure out how this is happening.
Wrong question to wrong people. You are in control of router and all connections. You can track connections and figure out WHERE it really originates, you can capture packets and look into them to figure out WHAT is being transmitted.The question is; how is this possible??? why is the router generating 1Mb of traffic and transmitting it to unknown IPs on weird ports???