Lurker News
Hello, I'm building SadServers.com, a SaaS where users can test their Linux troubleshooting skills on real Linux servers in a "Capture the Flag" fashion.

I hope this is useful, to learn more about the project please see https://github.com/fduran/sadservers

Comments (128) 30 threads

apawloski5 replies#
Based on your architecture diagram it looks like you're spinning up an instance per-user? As you're probably finding now, you will hit AWS limits quickly.

You might instead want to have a smaller pool of (larger) servers that you run co-resident VMs on with https://firecracker-microvm.github.io/. That will avoid account limits and also keep your AWS costs more predictable.

fduran#
Yes thanks!
temp08261 reply#
I haven't fully grokked this yet, but one trick I've used in the past to get around limits is AWS Organizations, creating a sub-account per property. A bit more setup but can keep things cleaner administratively.
icedchai2 replies#
AWS will raise limits if you ask. Increasing EC2 instance limits is usually a quick turn around.
ericbarrett#
Yes, the default limits are there to prevent abuse and runaway misconfigurations. They won't turn down revenue if you confirm it's intentional.
andrewstuart2#
At least for the tests I've done on a small startup recently, they've also implemented some automatic quota increases for EC2. I ran commands that would have (or did) eclipsed my quota, and got an email that my quotas were bumped a few minutes later.
ilyt2 replies#
That's kinda nice use case for the WASM machine/linux emulators, then you just need to provide image and user can run it in the browser

> You might instead want to have a smaller pool of (larger) servers that you run co-resident VMs on with https://firecracker-microvm.github.io/. That will avoid account limits and also keep your AWS costs more predictable.
I'd imagine (still waiting for it to load lmao) most of it could be containers too.

twalla#
Someone else linked https://github.com/copy/v86 which seems really neat.

I like making jokes with coworkers about implementing this or that bit of infra with WASM-based tools mostly to get a rise out of them but each time I make the joke I look into some of the tools or projects and the balance of joke to "I'm actually serious" shifts a little bit to the right.

encryptluks2#
So then users experience will be poor due to the slowness and non-standard implementation. A better solution IMO would be to provide a container with SSH access.
yamtaddle1 reply#
Just run them in Linux VMs with WASM, on the users' browsers. Make them all pay for it with higher utility bills and greater wear & tear on their hardware.

trollface.jpg

freeone30001 reply#
This is actually a good idea for this -- the user wants the education, they can pay for it with their own hardware. Keep your costs low!
cogman104 replies#
Probably a better experience for everyone. You just have to distribute the image (rather than running vms) and the user gets instantaneous responses.

Continue this thread — 4 replies

BossingAround3 replies#
Why not spin up containers instead of VMs? Seems to me containers would fit much better than VMs.
cogman101 reply#
Bypassing container security is easier than bypassing VM security.
tamrix#
Then wouldn't that be the ultimate test ;)
spiffytech2 replies#
Containers have a history of escape vulnerabilities, for reasons like sharing a kernel with the host and other containers.

VMs are designed from the ground up to isolate guests, rather than focusing on application deployment.
Firecracker is the modern container alternative in untrusted compute scenarios, with Fly.io even converting container images into Firecracker VMs.

NovemberWhiskey2 replies#
>Containers have a history of escape vulnerabilities

Generally agreed, but for this use-case do we care?

Continue this thread — 2 replies

encryptluks23 replies#
User mapping is now a standard feature in Kubernetes, so escape vulnerabilities aren't so much an issue anymore. Additionally, you can use gVisor.

Continue this thread — 3 replies

paulfurtado1 reply#
If the goal of the test is to debug a sad linux server, containers are going to severely limit what ways the server can be sad in, isn't it?
BossingAround3 replies#
Can you give me an example of some of the severe limitations you're mentioning?

Continue this thread — 3 replies

dugmartin2 replies#
I'd suggest integrating https://bellard.org/jslinux/ and running the VM in the browser if you can - then you can scale without running out of resources.
m00dy#
or linux kernel port on webassembly.
fduran#
Didn't know about this, thanks!
grepLeigh2 replies#
Very cool! This reminds me of the ops challenge @ Slack. I'm not sure if they still do this, but the SRE/platform infra interview used to involve a VM running a malfunctioning LAMP stack.

You'd get SSH access to the VM, then submit a diagnostic report of what was broken (and how you fixed it).
Reminded me of how Red Hat used to run their certification test (RHCE). I probably still have the live CDs for my RHCE laying around somewhere.

stevekemp#
I've had interviews like that in the past, and really enjoyed them. Much better than "Draw an architecture diagram for how you'd handle a serverless IoT application" - where you lose points, silenly, because you didn't pick something the interviewer expected you to do.

Usually a simple combination of immutable files, SELinux policies, and types in configuration files were enough for most of the challenges. Though now and again you'd find they'd given you a server with packages removed, or not yet installed.

jer0me1 reply#
New challenge: Fix SadServers’ sad servers
vetkat#
And while we’re at it, we might as well write a wrapper around low-upvote Server Fault questions in the hope that they attract more attention when the problem is gamified.

Load more comments