I set up a new, basic Linux server (CentOS in this case) just for testing purposes. In there, without any firewalls and all that I'm running a Python web application. Basically I type python run.py
and have the application on foreground, while the application itself is run on some port like 8080
, so in web browser I use I just type my_public_ip_addr:8080
and use it just fine. All this happens over SSH from my laptop.
Now, I left my laptop open for a while, and when I came back, the shell was displaying something like this:
83.20.238.86 - - [13/Mar/2019 08:54:43] "GET / HTTP/1.1" 200 -
87.122.83.97 - - [13/Mar/2019 11:55:30] "GET / HTTP/1.1" 200 -
176.32.33.145 - - [13/Mar/2019 12:08:36] "GET / HTTP/1.1" 200 -
176.32.33.145 - - [13/Mar/2019 12:08:36] code 400, message Bad request syntax ('\x16\x03\x01\x00\xfc\x01\x00\x00\xf8\x03\x03(\xd3FM\xf5\x0eLo\x17\xa3|\x1f8\xca~#\x07\xc1\x1f&&\x14\x19\x11\x10:\x824\xd23nA\x00\x00\x8c\xc00\xc0,\xc02\xc0.\xc0/\xc0+\xc01\xc0-\x00\xa5\x00\xa3\x00\xa1\x00\x9f\x00\xa4\x00\xa2\x00\xa0\x00\x9e\xc0(\xc0$\xc0\x14\xc0')
176.32.33.145 - - [13/Mar/2019 12:08:36] "��(M�L⎺�≠8#�&&:�4┼A��▮�←�2�↓�/�→�1�↑���������(�$��" 4▮▮ ↑
176↓32↓33↓145 ↑ ↑ [13/M▒⎼/2▮19 14:55:55] "GET / HTTP/1↓1" 2▮▮ ↑
176↓32↓33↓145 ↑ ↑ [13/M▒⎼/2▮19 14:55:55] c⎺de 4▮▮← └e⎽⎽▒±e B▒d ⎼e─┤e⎽├ ⎽≤┼├▒│ ('\│16\│▮3\│▮1\│▮▮\│°c\│▮1\│▮▮\│▮▮\│°8\│▮3\│▮3\│92\│8e\│°7\│9e\│1▒\│▒2\│1e\│°8\│°bb^\│1b\│d1\│▒1\│1e\│d2\│d1^\│1e/└\│96_(\│beU\│▮4\│8d≥\│d7⎻\│°e\│▮▮\│▮▮\│8c\│c▮▮\│c▮←\│c▮2\│c▮↓\│c▮/\│c▮→\│c▮1\│c▮↑\│▮▮\│▒5\│▮▮\│▒3\│▮▮\│▒1\│▮▮\│9°\│▮▮\│▒4\│▮▮\│▒2\│▮▮\│▒▮\│▮▮\│9e\│c▮(\│c▮$\│c▮\│14\│c▮')
176↓32↓33↓145 ↑ ↑ [13/M▒⎼/2▮19 14:55:55] "���������b^[⎺⎼▒┼±e@ce┼├⎺⎽↑⎺⎼▒┼±e ⎺⎼▒┼±e_±c]$ ^C
[⎺⎼▒┼±e@ce┼├⎺⎽↑⎺⎼▒┼±e ⎺⎼▒┼±e_±c]$ ┌⎺±⎺┤├
C⎺┼┼ec├☃⎺┼ ├⎺ 1▮4↓248↓36↓8 c┌⎺⎽ed↓
▒d▒└@±⎽:·$
▒d▒└@±⎽:·$
▒d▒└@±⎽:·$
▒d▒└@±⎽:·$ ec▒⎺ '▒e┌┌⎺ ⎽├▒c┐ ⎺┴e⎼°┌⎺┬'
▒e┌┌⎺ ⎽├▒c┐ ⎺┴e⎼°┌⎺┬
▒d▒└@±⎽:·$
You can see 3 last "normal" GET requests to /
, but then it begins. I know it can be fixed (link1 or link2) and these were some scanning bots, but my question is:
How does it work, that incoming request broke my terminal?
cat -vet
on that log file and show us the lines from 12:08:36 and 14:55:55 ? There might be a Ctrl-N in there. https://en.wikipedia.org/wiki/Shift_Out_and_Shift_In_characters – Mark Plotnick Mar 13 '19 at 17:09python run.py | tee run.log
followed byhexdump -C run.log
– Philip Couling Mar 13 '19 at 17:10