Hosting a Public Website on MS-DOS (2022)
fsturmat.net
fsturmat.net
He was quite cool, he wrote his own simple message board for the lecture, and when students hacked it and wrote fake messages under his name, he took it in a sporting spirit, and the students reached an informal understanding with him: it‘s fine to post under his name if it is in another color than his (his name was red) or it‘s something like "NotProfName".
I legit laughed out loud.
It's also very popular for ISPs to drop traffic on the windows file sharing ports, because it's almost all either malicious or at least unintentional.
Phew.
gets back to trying to convince his bank to send his data over plain FTP
Bob: A big round of applause to Fred and Jane for setting up that XZ back door! Boy that got us so much intel!
A round of polite clapping.
Bob: What’s your status, Igor?
Igor: Bah, my target is running web server on MS-DOS. I finally managed to hand craft 16 bit 8086 machine code exploit last night (mind you during Hacker News Hug of Death) and gain remote access to A: drive but it turns out secrets are actually hosted on Amiga 2000 on private LAN which I can ping but I don’t know 68k.
Bob: Fortunately we’re a state sponsored hacking organization so we have considerable resources. R.J., do you think you can help Igor?
R.J.: Sure! Igor, do you know if it has an OCS or ECS chipset? …
There is no botnet targeting web services running on DOS, because no one is running web services on DOS.
What exactly is the difference?
Bots, instead, throw shit at a wall and see what sticks. Move your SSH server with credentials root:root on port 1234 and notice how many bots get utterly defeated (only for sake of argument, because OpenSSH has a banner which makes it easy to identify wherever it's running)
And once it sticks, an insecure server has been found. A bot is just a tool someone is using.
Security through obscurity is an overused concept: it doesn't work against determined humans, but on the greater internet, when your adversary are bots, it is extremely effective.
And I like the screenshot showing "Bad command or file name". I saw that message plenty of times, although now it seems like a lifetime ago!
No different to my Python gunicorn web server then
I'd be surprised to see gunicorn do more than 1 request an hour on a 386.
Is that because of the lack of official 'forking'/threading, or due to the limitations of whatever TCP stack is being used for the listen() / accept() calls? (or something else?)
In the DOS days, dynamic memory allocation was to be avoided if possible. Machines did not handle running out of memory gracefully. Often we'd unnecessarily fix the size of things to avoid run-time uncertainty.
A scientific Fortran code I once saw allocated all of the memory it would need at the beginning of the code in an array called 'a'. Then from there it would dole out portions to other parts of the program using common blocks.
But I'm not sure if accepted sockets fall into this category.
For the HTTP server in this article, no. It contains an embedded TCP/IP stack (linked into the HTTP server executable), which expects to talk to a network card driver TSR using the "Packet Driver" API (normally INT 0x60, but the interrupt to use is configurable). Network connections completely bypass the files subsystem in the DOS kernel
Nowadays, the vast majority of people doing TCP/IP on DOS [0] use Packet Driver, and what I just said is true for anyone using that. However, historically there were a huge array of DOS TCP/IP stacks, all implemented differently. It would be (somewhat surprising) news to me if any of them represented individual network connections as files in the DOS kernel, but not having looked at them all, I can't confidently say.
[0] which is almost all hobbyist/retrocomputing: I'm sure there are a few embedded systems running DOS surviving, but most of those likely don't do networking, and many of the few that do may be running something other than TCP/IP, so any remaining production TCP/IP use under DOS is likely quite rare
I have a blog post: https://incoherency.co.uk/blog/stories/rc2014-web-server.htm...
And a github repo: https://github.com/jes/cpmhttpd
I was surprised to find out there is a TCP/IP stack for DOS, I remember still having to depend on non-MS software as late as Win 3.1 to connect to the internet [1], never heard of "LAN manager" [2] but apparently it did have (some?) support.
Btw, according to its author, "mTCP is a hobby project that I started in 2005." [3]
--
1: https://en.wikipedia.org/wiki/Trumpet_Winsock
NetBIOS / NetBEUI ?
Turn off the "overflow: hidden;" on the <body> element and the "overflow-y: scrol;" on the <div class="insides"> element and the whole page will now scroll with your mouse anywhere. Of course this loses the "scroll within the small window" effect and instead everything now scrolls (except the toolbar, which can be fixed by turning off "position: fixed;" on the <div class="horizontal"> element).
Discussed here last year: 2,500 continuous runtime hours on a 4.77Mhz DOS web server (90 comments): https://news.ycombinator.com/item?id=36731566
Ah, delving into the abyss of ancient servers, are we? Well, if there's one thing that tickles the fancy of the 'Atypical Geniuses Club,' it's a relic from the digital crypt. Count us in, presently inspecting the code armed with nothing but floppy disks and a dial-up connection!
You could give the qemu binary the capability to bind low numbered ports as a non-root user:
setcap 'cap_net_bind_service=+ep' $(which qemu-system-i386)
Or there's probably some arcane combination of systemd options to make it work just for that service. Maybe. [Service]
AmbientCapabilities=CAP_NET_BIND_SERVICEIs that how this works? I assumed qemu's BIOS was hooking INT 21h.