{"id":180,"date":"2010-10-01T12:28:53","date_gmt":"2010-10-01T10:28:53","guid":{"rendered":"http:\/\/lunatic.no\/?p=180"},"modified":"2010-10-01T12:28:53","modified_gmt":"2010-10-01T10:28:53","slug":"routeros-mac-telnet-application-for-linux-users","status":"publish","type":"post","link":"http:\/\/130.61.186.249\/index.php\/2010\/10\/01\/routeros-mac-telnet-application-for-linux-users\/","title":{"rendered":"RouterOS Mac-Telnet application for Linux users"},"content":{"rendered":"<p>Earlier, I wrote about a <a href=\"http:\/\/lunatic.no\/2010\/06\/dissecting-mikrotiks-mac-telnet-packets\/\">Wireshark plugin<\/a> for dissecting Mac-Telnet packets. Now I have created an open source application for connecting to a RouterOS router via its MAC address from Linux without having to install Wine. At the time of writing the project is still in &#8220;alpha&#8221; stage. But it is fully functional. Though it will probably be rewritten soon. I feel that the second time you write the same application, it tends to be more robust and thought through.. The first time is more of a proof of concept, and I let myself do a lot of short-cuts, just to be able to see it working.<br \/>\nThe source code can be found at <a href=\"http:\/\/github.com\/haakonnessjoen\/MAC-Telnet\">github<\/a>. Just find the &#8220;download source&#8221; link at the top of the page.<br \/>\nTo compile it, simply untar it, and compile it with &#8220;make&#8221; .<br \/>\nBecause it needs to alter the frame headers, it uses RAW sockets, which means that you will need root access to use this tool.<br \/>\nTo find the MAC address of connected routers, try the included tool mndp. It might take up to 2 minutes to find all routers, since it is a passive tool that waits for the routers to broadcast their info on the network:<\/p>\n<pre escaped=\"true\" lang=\"bash\" line=\"0\">\n# .\/mndp\nSearching for MikroTik routers... Abort with CTRL+C.\n  0:c:42:43:58:a5 HMG\n<\/pre>\n<p>HMG is my name of the found router, set in the Identity section of the router.<br \/>\nHere are some mac-telnet usage information:<\/p>\n<pre escaped=\"true\" lang=\"bash\" line=\"0\">\n# .\/mactelnet --help\nUsage: .\/mactelnet &lt;ifname&gt; &lt;MAC&gt; &lt;username&gt; [password]\nParameters:\n  ifname    Network interface that the RouterOS resides on. (ex: eth0)\n  MAC       MAC-Address of the RouterOS device. Use mndp to discover them.\n  username  Your username.\n  password  Your password.\n<\/pre>\n<p><strong>Tip:<\/strong> Log out using CTRL+D on your keyboard.<br \/>\nUsage example:<\/p>\n<pre escaped=\"true\" lang=\"bash\" line=\"0\">\n# sudo .\/mactelnet eth0 0:c:42:43:58:a5 admin mysecretpass\nConnecting to 0:c:42:43:58:a5...done\n  MMM      MMM       KKK                          TTTTTTTTTTT      KKK\n  MMMM    MMMM       KKK                          TTTTTTTTTTT      KKK\n  MMM MMMM MMM  III  KKK  KKK  RRRRRR     OOOOOO      TTT     III  KKK  KKK\n  MMM  MM  MMM  III  KKKKK     RRR  RRR  OOO  OOO     TTT     III  KKKKK\n  MMM      MMM  III  KKK KKK   RRRRRR    OOO  OOO     TTT     III  KKK KKK\n  MMM      MMM  III  KKK  KKK  RRR  RRR   OOOOOO      TTT     III  KKK  KKK\n  MikroTik RouterOS 4.0 (c) 1999-2009       http:\/\/www.mikrotik.com\/\n[admin@HMG] &gt;\n<\/pre>\n<p>[UPDATE]<br \/>\n<a href=\"http:\/\/www.omniflux.com\/\">Omni Flux<\/a> sent me a patch that speeds up the MNDP discovery time by sending out a MNDP request before waiting for replies. Thanks!<br \/>\nHe also informed me that his tests showed that you could send all the mac-telnet traffic to- and from- the broadcast address. This means that you would not need socket_raw (read: root privileges) capabillities to be able to send data to the router.<br \/>\nSo the latest version of mactelnet, now also as a binary .deb package below, can be used without root privileges, unless you don&#8217;t want all data from your session to be broadcasted on your local network. You can optionally use the &#8220;old&#8221; method, where it uses the destination routers mac address as destination instead of broadcast.<br \/>\nHeres the latest &#8220;stable&#8221;: v0.1 version<br \/>\n<a href=\"http:\/\/github.com\/haakonnessjoen\/MAC-Telnet\/tarball\/v0.1\">Source tarball<\/a><br \/>\n<a href=\"http:\/\/github.com\/downloads\/haakonnessjoen\/MAC-Telnet\/mactelnet_0.1-0ubuntu1_i386.deb\">Ubuntu\/Debian binary package<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Earlier, I wrote about a Wireshark plugin for dissecting Mac-Telnet packets. Now I have created an open source application for connecting to a RouterOS router via its MAC address from Linux without having to install Wine. At the time of writing the project is still in &#8220;alpha&#8221; stage. But it is fully functional. Though it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,22,27],"tags":[],"class_list":["post-180","post","type-post","status-publish","format-standard","hentry","category-cprogramming","category-mikrotik","category-routeros"],"_links":{"self":[{"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/posts\/180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/comments?post=180"}],"version-history":[{"count":0,"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/posts\/180\/revisions"}],"wp:attachment":[{"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/media?parent=180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/categories?post=180"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/130.61.186.249\/index.php\/wp-json\/wp\/v2\/tags?post=180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}