The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
Please vote in the Forum Structure Poll. Polling will close at 2PM EST on January 21, 2025.

Did somebody hack my frigging map?! A [chat] thread.

Donkey KongDonkey Kong Putting Nintendo out of business with AI nipsRegistered User regular
edited June 2019 in Debate and/or Discourse
I have a little Raspberry Pi embedded computer that I use to drive a bunch of LED arrays mounted behind a map. Nothing special, it's just a 3D printed relief map of the earth with combined elevation and bathymetry data, so you can visualize the size of mountains relative to ocean trenches. It is a project that my husband and I have worked on together intermittently for over a year.

The LED arrays + Raspberry Pi give the map realtime, animated coloration for things like sunlight, moon position, date, etc. It's pretty neat and a lot more fun than a wall clock. If you are not a computer IRL, just enjoy the pretty pictures of the make process. If you are a computer, then enjoy the make photos and this ridiculous troubleshooting mystery.

map1.jpg
The 3D printer that started it all. Look at them custom noctua fans on the print head, mmmm

So I complete work on the map on March 31st this year. It runs great as a piece of interactive wall art for a little over a month until a few weeks ago, when the map breaks down. I turn it on to show some guests and the date and time are wrong on the sunlight map overlay. The sun isn't moving. Which is weird because it's supposed to set its clock using internet time. I check my wifi router and the Raspberry Pi is on my network and responding to pings. I open my laptop and try to SSH in (remotely log in using a text terminal) and it refuses my password! No matter what I put for a password, the one I set, variants, the original default, it refuses SSH connections. At this point I am worried it was hacked and had its password changed somehow, so I unplug it to deal with later. It was my wedding day (!) so I had to go. Imagine having to drop an amazing technical mystery for some dumb ceremony.

Secret Wedding Zone
I don't have many photos from the wedding until the photographer finishes her work, so here's basically everything good that I've got:

swz1.jpg
My sister pinning on my boutonnière

swz2.jpg
My sister's fiancee pinning on my husband's boutonnière

swz3.jpg
Duffy trying on his tux

swz4.jpg
Duffy refused to pose for any photos so I scooped him up like a baby

swz5.jpg
Gay wedding selfie with my sister and her fiancee

swz6.jpg
I am Bowser obviously. Duffy is the piranha plant.

A few days later, I come back, married, and pick this thing back up. I look online for "Raspberry Pi refuses SSH credentials" and other similar queries and every response was a condescending "ok grandma, so you forgot your password..." I mean, fair, but no, fuck you! I didn't! This is definitely the right password it's just not working!

map2.jpg
First test print: A tile containing India with combined elevation/bathymetry data

I take the Pi and plug it into a keyboard and monitor and boot it. It starts up, presents a login prompt, and proceeds to refuse my credentials LOCALLY. Ok that's really not good. Maybe it was hacked. I look online for password reset options and people suggest putting the pi into "single user mode", which is like a safe boot mode where you get access to the command line. You don't have to log in, and you get full access to fix things, reset passwords, etc.

If you're not familiar, the Raspberry Pi's primary storage is a micro sd card that's split into two partitions. One is called "boot" and is FAT formatted (readable and writable from a Mac or Windows PC). This partition is tiny and contains only a handful of configuration files meant to make setting up the raspberry pi easy. From "boot" you can specify wifi info, CPU clock speed, HDMI format, etc.

map3.jpg
Several map tiles coming together

The other partition is called "rootfs" and is where the linux OS lives. It is ext4 formatted, which requires custom file system drivers for read-only access under Mac and Windows, and read/write access is discouraged from anything but a Linux machine. Of which the Raspberry Pi was my only linux machine.

Luckily putting the Pi into single user mode can be done through changes to configuration files on the "boot" partition, the one I can easily read and write. So I stuff the SD card into my laptop, and edit the config file. I boot the Pi into single user mode and uh... well at first it won't connect to my keyboard. It says unknown USB device on the command line and hangs. Nobody online has seen this issue before. I hunt around for the keyboard I'd used when I first set things up. I find it, connect it, tap a few keys, and it works! Ok. I can use the command line! I punch in a command, press return and... nothing. The computer does nothing. It doesn't respond and it stops accepting new input.

I try several different flavors of single user mode suggested online. One says "cannot attach to TTY device". Another asks for my root password then tells me it's wrong (it's not).

I sigh and restore all the configuration files back to default, plug the Pi back into the map and power it on. Now it doesn't even come up with the wrong time. It's blank. It's dead. It feels hot. I unplug it. Defeated, I push to another day.

map4.jpg
A frame made from 80-20, and mounting the LED panels

I start day 2 with a new plan. I need to dig through the Linux filesystem of the raspberry pi and see if I can spot anything wrong. I need another Linux machine to do this, so I install Mint Linux on a Virtual Machine. I spend an hour troubleshooting VM configuration issues (a hearty fuck you to both virtualbox and mint). I track down a USB SD card reader that I can forward to the VM. I spend another 20 minutes getting that to work. (another hearty fuck you to virtual box).

Finally, I pull the SD card from the raspberry pi, insert it into my computer, and forward it to the VM. After a moment, it mounts and I can see the raspberry pi's entire filesystem, not just the "boot" half. I dig in.

I'm no Linux guru but everything seems normal. The typical folders you'd expect for a linux system are there. My software is all built and configured to run. The config files in /etc seem ok. Eventually I find a file I want to look at that needs system-level access, so I use "sudo nano /etc/passwd" to open it. Right away, Nano, the text editor I'm using, complains that it can't make a backup file because 'there is no available disk space.

Wait a minute. WAAAAAIIIIIT A MINUTE.

I check the rootfs partition. Zero bytes available. Zero bytes of a 32GB SD card that was nearly empty when I set it up! I get a disk space utility and look where all the space has gone.

map6.jpg
Frame assembled and map complete

/var/log contains 29GB of data. daemon.log is 12 GB alone. The system logs and log backups make up the rest. I try to read a log file by dumbly double clicking it. The VM freezes hard, but I can see that something is spitting out repeated messages:

Received unknown command ""
Received unknown command ""
Received unknown command ""
(repeating all the way down the screen)

I recognize these messages. They're from the software I wrote to run the visuals for the map. It accepts text commands by UDP packet or by standard input (if running in the foreground on the command line). So this message repeating means either I fucked up or something is on my network spewing blank UDP packets on the port used by my software. I pray it's not the latter because that just creates a fresh new hell.

I force reboot the frozen VM, delete all the logs, and put the SD card back into the Pi. My LED array service happily boots and shows the pretty animated map graphics and the correct date/time! Hooray! I try to log in with SSH. Password refused! Hooray!

map7.jpg
An LED systems test. I'd later tune it to be a lot brighter. This is just a real color earth map.

Power map off, SD card back in the laptop. Over the next hour, I discover that while running the system with free disk space at 0, Linux managed to, entirely on its own, trash configuration file at "/etc/shadow". The shadow file is where linux stores your password (encrypted ofc). I couldn't log in not because my password was wrong, but because my account didn't HAVE a password. No accounts had a password anymore! I learn enough linux admin to restore "/etc/shadow" from a backup (thank fuck for this linux distribution automatically backing it up to /var/backup!).

Put card back into pi. Boot pi. Try SSH again. I CAN LOG IN! FINALLY! I check the log files and yes they are growing steadily as long as my map service is running. A megabyte or so a minute. It can run for about 20 days straight and then the card will be full again. Time to fix this thing. I try to stop my service to debug it, which requires sudo (how to tell linux you're permitted to edit system files and end services). Sudo, not my command but sudo itself fails with the message "cannot resolve hostname". What.

Another hour passes. Did you know that if your /etc/hosts file is missing you cannot use sudo over SSH? The system tries to look up if the user "pi@hostname" is permitted to use sudo, but doesn't know that hostname is ITS OWN NAME. So you cannot use sudo. Jesus why did all these files spontaneously delete with low disk space?

map8.jpg
A debug overlay, similar to a normal map, testing my code for projecting latitude/longitude data on to the map. All the projection is done in shader language in the Rasbperry Pi's GPU to free the CPU to drive the LED panels

After more linux admin learning, I go off and recreate the "hosts" and "group" configuration files by hand (no backups this time). They must have been lost the same way shadow was. After this, I reboot the pi and behold, I can SSH and sudo while SSH'd.

I finally get to the part where I can debug my app and discover that, mercifully, the blank commands are not coming from some network device spewing UDP packets (as I feared). The mysteries finally start decreasing in number. My network is secure, no Internet of Things device is being dumb, nobody hacked anything.

My app is logging thousands of messages per minute because to process command input from the command line, I'm using std::getline(). In a background process, one not attached to a terminal, getline() returns "false" right away, indicating there is no input device, and provides a blank string to the app. I wasn't checking what getline() returned at all. I hadn't noticed because I did all my testing from a regular terminal that didn't have this behavior.

I add a case to make sure that if getline returns false, I stop trying to call it. The log file stops growing. I build my changes, reboot, and the map is running happily, not to mention using way less CPU now that I don't have a dedicated thread continuously filling my disk with trash!

My map is back! Hopefully it won't break again. All is well.

map9.jpg
The map in "day mode" where I simplify the graphics to darkest black and brightest white so you can still see it with lots of ambient light

This was all pretty interesting to me because the symptom presentation was particularly bizarre and it's apparently never happened to anyone else on the internet ever before. All googling told me was "you forgot your password lol". I started doubting my sanity until I noted the full disk and started following the breadcrumbs.

And when single user mode didn't work, google just said "you are doing it wrong also just reflash the pi, you noob". Glad I didn't do that. It would have worked... for about 20 days before the disk filled again. I'd have repeated this again in a month before probably throwing the entire thing in the trash.

Anyway that's my map troubleshooting saga. It better run forever now.

map10.jpg
The map in "night mode" where you get a full color earth and light pollution visualization

Oh yeah, it has a voice interface too:
https://www.youtube.com/watch?v=zD00phfiT5c

Thousands of hot, local singles are waiting to play at bubbulon.com.
Donkey Kong on
«13456798

Posts

  • Duke 2.0Duke 2.0 Time Trash Cat Registered User regular
    You claim to not be a grandma, as you ask for tech support while showing us one of your crafts projects and wedding photos of your husband

    VRXwDW7.png
  • BogartBogart Streetwise Hercules Registered User, Moderator Mod Emeritus
  • Donkey KongDonkey Kong Putting Nintendo out of business with AI nips Registered User regular
    Ok, I got it all fucking posted. Jesus christ vanilla!

    It refused to allow me to submit a post containing the names of the Linux password and shadow files! It straight up blocked me with a security alert!
    q5awomtd3p9e.png

    Thousands of hot, local singles are waiting to play at bubbulon.com.
  • RMS OceanicRMS Oceanic Registered User regular
    *Blushes*

  • SleepSleep Registered User regular
    Well at least vanilla is really strict about code injection

  • Hahnsoo1Hahnsoo1 Make Ready. We Hunt.Registered User, Moderator, Administrator admin
    I'm loving the Trojan Horse wedding photos. Brilliant!

    8i1dt37buh2m.png
  • bloodyroarxxbloodyroarxx Casa GrandeRegistered User regular
    DK a those cakes are LEGIT

    Also that map is next level rad

  • Casual EddyCasual Eddy The Astral PlaneRegistered User regular
    I grudgingly find this awesome

  • jungleroomxjungleroomx It's never too many graves, it's always not enough shovels Registered User regular
    Yeah that's pretty amazing DK

  • VishNubVishNub Registered User regular
    edited June 2019
    I would comment approvingly/disapprovingly but none of the pictures are loading for me.

    VishNub on
  • bloodyroarxxbloodyroarxx Casa GrandeRegistered User regular
    So I called the cable company this time and had it escalated to a supervisor

    Told them what the guy said and thankfully the supervisor agreed we should be doing a lot more work and testing before deciding that somehow they don’t want my money

  • credeikicredeiki Registered User regular
    I love the outfits you ended up doing! So summery and festive and classy!

    Steam, LoL: credeiki
  • VishNubVishNub Registered User regular
    Kamiro wrote: »
    VishNub wrote: »
    I would comment approvingly/disapprovingly but none of the pictures are loading for me.

    oh, like your instagram posts?

    In this case its my work filter being stupid, but yes.

  • Donkey KongDonkey Kong Putting Nintendo out of business with AI nips Registered User regular
    VishNub wrote: »
    I would comment approvingly/disapprovingly but none of the pictures are loading for me.

    I thought the photos were what was causing Vanilla to poop the bed at first, so I hosted them at bubbulon.com. Are you at work and your workplace blocks bubbulon? The home page of Easy Tetris?

    Thousands of hot, local singles are waiting to play at bubbulon.com.
  • VishNubVishNub Registered User regular
    edited June 2019
    VishNub wrote: »
    I would comment approvingly/disapprovingly but none of the pictures are loading for me.

    I thought the photos were what was causing Vanilla to poop the bed at first, so I hosted them at bubbulon.com. Are you at work and your workplace blocks bubbulon? The home page of Easy Tetris?
    yep.

    It is a surprising fickle and arbitrary set of things it decides to block.

    VishNub on
  • ChanusChanus Harbinger of the Spicy Rooster Apocalypse The Flames of a Thousand Collapsed StarsRegistered User, Moderator mod
    i want to do the right thing here and not awesome DK’s OP and act all disenchanted and unaffected but it is just too truly awesome and now i’m mad >:[

    Allegedly a voice of reason.
  • VishNubVishNub Registered User regular
    9rdo5r088cdt.png

  • VishNubVishNub Registered User regular
    Im not sure whats going on in top left

  • VishNubVishNub Registered User regular
    Though I appreciate that top right flasher is wearing a hat.

  • ChanusChanus Harbinger of the Spicy Rooster Apocalypse The Flames of a Thousand Collapsed StarsRegistered User, Moderator mod
    VishNub wrote: »
    Im not sure whats going on in top left

    touching your own boob

    the worst kind of harassment

    Allegedly a voice of reason.
  • PowerpuppiesPowerpuppies drinking coffee in the mountain cabinRegistered User regular
    Why would you want to deny DK the awesomes that are rightfully his!

    sig.gif
  • jungleroomxjungleroomx It's never too many graves, it's always not enough shovels Registered User regular
    Chanus wrote: »
    VishNub wrote: »
    Im not sure whats going on in top left

    touching your own boob

    the worst kind of harassment

    Realizing you forgot your deodorant

  • Kid PresentableKid Presentable Registered User regular
    yep that's all the types

  • ChanusChanus Harbinger of the Spicy Rooster Apocalypse The Flames of a Thousand Collapsed StarsRegistered User, Moderator mod
    Why would you want to deny DK the awesomes that are rightfully his!

    i physically cannot

    Allegedly a voice of reason.
  • ElldrenElldren Is a woman dammit ceterum censeoRegistered User regular
    So I called the cable company this time and had it escalated to a supervisor

    Told them what the guy said and thankfully the supervisor agreed we should be doing a lot more work and testing before deciding that somehow they don’t want my money

    Cable companies: the worst

    fuck gendered marketing
  • VishNubVishNub Registered User regular
    Chanus wrote: »
    VishNub wrote: »
    Im not sure whats going on in top left

    touching your own boob

    the worst kind of harassment

    Realizing you forgot your deodorant

    I'm not saying I haven't done exactly that gesture...

  • Donkey KongDonkey Kong Putting Nintendo out of business with AI nips Registered User regular
    edited June 2019
    If you don't complete a multi-year, highly technical project AND get married, all in service of a post on a forum, can you even call it an effortpost? You slouch? You layabout? You sloth?

    Donkey Kong on
    Thousands of hot, local singles are waiting to play at bubbulon.com.
  • Jubal77Jubal77 Registered User regular
    VishNub wrote: »
    Im not sure whats going on in top left

    Is she laughing at top right?

  • NFytNFyt They follow the stars, bound together. Strands in a braid till the end.Registered User regular
    If you don't complete a multi-year, highly technical project AND get married, all in service of a post on a forum, can you even call it an effortpost? You slouch? You layabout? You sloth?

    Yeah but what are you gonna do for the next time you get to start a [chat]?

    It was that somehow, from within the derelict-horror, they had learned a way to see inside an ugly, broken thing... And take away its pain.
    Warframe/Steam: NFyt
  • bloodyroarxxbloodyroarxx Casa GrandeRegistered User regular
    So twitch announced the ability to have subscriber only streams

    It didn’t go over well

  • emnmnmeemnmnme Registered User regular
    Chanus wrote: »
    VishNub wrote: »
    Im not sure whats going on in top left

    touching your own boob

    the worst kind of harassment

    Realizing you forgot your deodorant

    Wearing an ill-fitting Lisa Simpsons wig in public.

  • Jubal77Jubal77 Registered User regular
    So twitch announced the ability to have subscriber only streams

    It didn’t go over well

    They have to get the porn on there somehow.

  • FeralFeral MEMETICHARIZARD interior crocodile alligator ⇔ ǝɹʇɐǝɥʇ ǝᴉʌoɯ ʇǝloɹʌǝɥɔ ɐ ǝʌᴉɹp ᴉRegistered User regular
    @Donkey Kong your whole post, your map, your wedding, your dog, and you are amazing

    I will resist the temptation to make stupid UDP jokes for now

    every person who doesn't like an acquired taste always seems to think everyone who likes it is faking it. it should be an official fallacy.

    the "no true scotch man" fallacy.
  • PreacherPreacher Registered User regular
    So twitch announced the ability to have subscriber only streams

    It didn’t go over well

    It's a really weird idea. I think its supposed to be like patreon only streams that were popular with like youtube streamers. But like without the non subs to watch your stream you're cutting out views and ad dollars and potential subs for no real benefit?

    I would like some money because these are artisanal nuggets of wisdom philistine.

    pleasepaypreacher.net
  • SniperGuySniperGuy SniperGuyGaming Registered User regular
    Preacher wrote: »
    So twitch announced the ability to have subscriber only streams

    It didn’t go over well

    It's a really weird idea. I think its supposed to be like patreon only streams that were popular with like youtube streamers. But like without the non subs to watch your stream you're cutting out views and ad dollars and potential subs for no real benefit?

    Well the idea is to encourage people to sub so they can get in on the occasional sub only stream, right? Presumably if someone's doing one and you try to tune in, it'll prompt you to subscribe first. If you're doing it all the time sure it won't go well, but if you throw one in occasionally where you do some special event, I can see that driving some numbers.

    Won't work for small streamers though.

  • BurnageBurnage Registered User regular
    Chat, make a decision for me

    Hollow Knight, or Bloodstained

    Or maybe... both?

  • VishNubVishNub Registered User regular
    Ok now that I’m on mobile that’s amazing.

  • emnmnmeemnmnme Registered User regular
    Burnage wrote: »
    Chat, make a decision for me

    Hollow Knight, or Bloodstained

    Or maybe... both?

    *froths*
    *twitches*

  • VishNubVishNub Registered User regular
    Isn’t there already a sub mode where only subs can comment?

  • Jubal77Jubal77 Registered User regular
    VishNub wrote: »
    Isn’t there already a sub mode where only subs can comment?

    There is sub only chat and sub only vod viewing yeah. Just not sub only live viewing heh.

This discussion has been closed.