Tudo bem, deixei meu servidor Node.js sozinho por um tempo e voltei para encontrar algumas coisas realmente interessantes nos logs. Aparentemente, algum idiota da China ou da Polônia tentou hackear meu servidor usando o diretório traversal e o que não, embora pareça que ele não tenha conseguido, não consigo entender algumas entradas no log. Esta é a saída de um arquivo "hohup.out".
O ataque começa, aparentemente ele está tentando descobrir alguma entrada de console no meu servidor. Todas as quais falham e retornam um 404.
[90mGET /../../../../../../../../../../../ [31m500 [90m6ms - 2b[0m
[90mGET /<script>alert(53416)</script> [33m404 [90m7ms[0m
[90mGET / [32m200 [90m2ms - 240b[0m
[90mGET / [32m200 [90m1ms - 240b[0m
[90mGET / [32m200 [90m2ms - 240b[0m
[90mGET /pz3yvy3lyzgja41w2sp [33m404 [90m1ms[0m
[90mGET /stylesheets/style.css [33m404 [90m0ms[0m
[90mGET /index.html [33m404 [90m1ms[0m
[90mGET /index.htm [33m404 [90m0ms[0m
[90mGET /default.html [33m404 [90m0ms[0m
[90mGET /default.htm [33m404 [90m1ms[0m
[90mGET /default.asp [33m404 [90m1ms[0m
[90mGET /index.php [33m404 [90m0ms[0m
[90mGET /default.php [33m404 [90m1ms[0m
[90mGET /index.asp [33m404 [90m0ms[0m
[90mGET /index.cgi [33m404 [90m0ms[0m
[90mGET /index.jsp [33m404 [90m1ms[0m
[90mGET /index.php3 [33m404 [90m0ms[0m
[90mGET /index.pl [33m404 [90m0ms[0m
[90mGET /default.jsp [33m404 [90m0ms[0m
[90mGET /default.php3 [33m404 [90m0ms[0m
[90mGET /index.html.en [33m404 [90m0ms[0m
[90mGET /web.gif [33m404 [90m34ms[0m
[90mGET /header.html [33m404 [90m1ms[0m
[90mGET /homepage.nsf [33m404 [90m1ms[0m
[90mGET /homepage.htm [33m404 [90m1ms[0m
[90mGET /homepage.asp [33m404 [90m1ms[0m
[90mGET /home.htm [33m404 [90m0ms[0m
[90mGET /home.html [33m404 [90m1ms[0m
[90mGET /home.asp [33m404 [90m1ms[0m
[90mGET /login.asp [33m404 [90m0ms[0m
[90mGET /login.html [33m404 [90m0ms[0m
[90mGET /login.htm [33m404 [90m1ms[0m
[90mGET /login.php [33m404 [90m0ms[0m
[90mGET /index.cfm [33m404 [90m0ms[0m
[90mGET /main.php [33m404 [90m1ms[0m
[90mGET /main.asp [33m404 [90m1ms[0m
[90mGET /main.htm [33m404 [90m1ms[0m
[90mGET /main.html [33m404 [90m2ms[0m
[90mGET /Welcome.html [33m404 [90m1ms[0m
[90mGET /welcome.htm [33m404 [90m1ms[0m
[90mGET /start.htm [33m404 [90m1ms[0m
[90mGET /fleur.png [33m404 [90m0ms[0m
[90mGET /level/99/ [33m404 [90m1ms[0m
[90mGET /chl.css [33m404 [90m0ms[0m
[90mGET /images/ [33m404 [90m0ms[0m
[90mGET /robots.txt [33m404 [90m2ms[0m
[90mGET /hb1/presign.asp [33m404 [90m1ms[0m
[90mGET /NFuse/ASP/login.htm [33m404 [90m0ms[0m
[90mGET /CCMAdmin/main.asp [33m404 [90m1ms[0m
[90mGET /TiVoConnect?Command=QueryServer [33m404 [90m1ms[0m
[90mGET /admin/images/rn_logo.gif [33m404 [90m1ms[0m
[90mGET /vncviewer.jar [33m404 [90m1ms[0m
[90mGET / [32m200 [90m2ms - 240b[0m
[90mGET / [32m200 [90m2ms - 240b[0m
[90mGET / [32m200 [90m7ms - 240b[0m
[90mOPTIONS / [32m200 [90m1ms - 3b[0m
[90mTRACE / [33m404 [90m0ms[0m
[90mPROPFIND / [33m404 [90m0ms[0m
[90mGET /\./ [33m404 [90m1ms[0m
Mas aqui é quando as coisas começam a ficar suspeitas.
[90mGET http://www.google.com/ [32m200 [90m2ms - 240b[0m
[90mGET http://www.google.com/ [32m200 [90m1ms - 240b[0m
[90mGET http://www.google.com/ [32m200 [90m1ms - 240b[0m
[90mGET /manager/html [33m404 [90m1ms[0m
[90mGET /manager/html [33m404 [90m1ms[0m
[90mGET http://www.google.com/ [32m200 [90m1ms - 240b[0m
[90mGET / [32m200 [90m2ms - 240b[0m
[90mGET / [32m200 [90m1ms - 240b[0m
[90mGET /robots.txt [33m404 [90m1ms[0m
[90mGET /manager/html [33m404 [90m1ms[0m
[90mGET http://www.google.com/ [32m200 [90m1ms - 240b[0m
[90mGET /manager/html [33m404 [90m1ms[0m
[90mGET /manager/html [33m404 [90m1ms[0m
[90mGET /manager/html [33m404 [90m0ms[0m
[90mGET /manager/html [33m404 [90m1ms[0m
[90mGET /manager/html [33m404 [90m3ms[0m
[90mGET /manager/html [33m404 [90m0ms[0m
[90mGET /manager/html [33m404 [90m1ms[0m
[90mGET /manager/html [33m404 [90m1ms[0m
[90mGET /manager/html [33m404 [90m0ms[0m
[90mGET http://www.google.com/ [32m200 [90m1ms - 240b[0m
[90mGET http://37.28.156.211/sprawdza.php [33m404 [90m1ms[0m
[90mGET http://www.google.com/ [32m200 [90m1ms - 240b[0m
[90mGET /manager/html [33m404 [90m1ms[0m
[90mGET http://www.google.com/ [32m200 [90m2ms - 240b[0m
[90mHEAD / [32m200 [90m1ms - 240b[0m
[90mGET http://www.daydaydata.com/proxy.txt [33m404 [90m19ms[0m
[90mHEAD / [32m200 [90m1ms - 240b[0m
[90mGET /manager/html [33m404 [90m2ms[0m
[90mGET / [32m200 [90m4ms - 240b[0m
[90mGET http://www.google.pl/search?q=wp.pl [33m404 [90m1ms[0m
[90mGET /manager/html [33m404 [90m0ms[0m
[90mHEAD / [32m200 [90m2ms - 240b[0m
[90mGET http://www.google.pl/search?q=onet.pl [33m404 [90m1ms[0m
[90mHEAD / [32m200 [90m2ms - 240b[0m
[90mGET http://www.google.com/ [32m200 [90m1ms - 240b[0m
[90mGET http://www.google.pl/search?q=ostro%C5%82%C4%99ka [33m404 [90m1ms[0m
[90mGET http://www.google.pl/search?q=google [33m404 [90m1ms[0m
[90mGET /manager/html [33m404 [90m1ms[0m
[90mGET http://www.google.com/ [32m200 [90m2ms - 240b[0m
[90mHEAD / [32m200 [90m2ms - 240b[0m
[90mGET /manager/html [33m404 [90m1ms[0m
[90mGET /manager/html [33m404 [90m0ms[0m
[90mGET / [32m200 [90m2ms - 240b[0m
[90mGET http://www.baidu.com/ [32m200 [90m2ms - 240b[0m
[90mGET /manager/html [33m404 [90m1ms[0m
[90mGET /manager/html [33m404 [90m1ms[0m
[90mPOST /api/login [32m200 [90m1ms - 28b[0m
[90mGET /web-console/ServerInfo.jsp [33m404 [90m2ms[0m
[90mGET /manager/html [33m404 [90m1ms[0m
[90mGET http://www.google.com/ [32m200 [90m10ms - 240b[0m
[90mGET http://www.google.com/ [32m200 [90m1ms - 240b[0m
[90mGET / [32m200 [90m2ms - 240b[0m
[90mGET /manager/html [33m404 [90m1ms[0m
[90mGET http://proxyjudge.info [32m200 [90m2ms - 240b[0m
[90mGET / [32m200 [90m2ms - 240b[0m
[90mGET / [32m200 [90m1ms - 240b[0m
[90mGET http://www.google.com/ [32m200 [90m3ms - 240b[0m
[90mGET http://www.google.com/ [32m200 [90m3ms - 240b[0m
[90mGET http://www.baidu.com/ [32m200 [90m1ms - 240b[0m
[90mGET /manager/html [33m404 [90m0ms[0m
[90mGET /manager/html [33m404 [90m1ms[0m
[90mGET http://www.google.com/ [32m200 [90m2ms - 240b[0m
[90mHEAD / [32m200 [90m1ms - 240b[0m
[90mGET http://www.google.com/ [32m200 [90m1ms - 240b[0m
[90mGET http://www.google.com/search?tbo=d&source=hp&num=1&btnG=Search&q=niceman [33m404 [90m2ms[0m
Então, minhas perguntas são: como meu servidor está retornando um "200" OK para domínios de nível raiz? Como o hacker conseguiu enviar uma solicitação GET ao meu servidor, de modo que " link " aparece no log, enquanto meu servidor é simplesmente um API que funciona em URLs relativas, como "/ api / login".
E, enquanto eu procurava as solicitações HTTP OPTIONS, TRACE e PROPFIND que meu servidor tinha logado, seria ótimo se alguém pudesse explicar exatamente o que o hacker estava tentando alcançar usando esses verbos?
Além disso, o que no mundo faz "[90m [32m [90m1ms - 240b [0m" significa? O "ms" faz sentido, provavelmente milissegundos para o pedido, resto eu não consigo entender.
Obrigado!