Trying (And Failing) to Hack the Wall of Sheep
The Wall of Sheep is a popular exhibit at DEF CON. Participants run packet sniffers on an insecure Wi-Fi network and try to catch people logging into unencrypted websites and other services. If they see that happening, they post the person's username and password on a giant display. It looks something like:
That's an excellent reminder to be careful when you're connected to an unknown network, and not to send your login credentials out in the open.
From the first time I saw it, though, I had to wonder: is the wall itself hackable? Could I make it look like this instead?
The idea kept bouncing around the back of my mind until I added it to my to-do list so I could stop thinking about it. I had to at least try it.
I know nothing about the Wall of Sheep's internal workings. That's deliberate. I wanted to test this for the fun of it, and part of the challenge was to see how far I could get without any knowledge of it. I had to make a few assumptions:
- If you're connected to the right Wi-Fi network and submit credentials in plaintext, they'll be shown on the wall.
- The process of getting captured credentials on the wall is automated.
- The wall is rendered by a web browser.
- The wall's software has been around for a while and wasn't written to be particularly secure. After all, it's on the attacking end, right?
- No one's tried this before, so no one's fixed it before.
Choosing the attack
But how do I get that onto the board? The password field is usually censored, such as
hunter2 being masked to
hunt***. That would destroy the payload, so that wouldn't work. Is there a way to make a DNS hostname that renders correctly? Eh, maybe, but crafting that sounds like work. (Note to self: but boy, wouldn't that wreak havoc on the web? Huh. I've gotta look into that.)
Setting up a webserver
This attack requires a webserver to send those faked credentials to. For ease of implementation, I configured HTTP Basic authentication with:
Getting onto the DefCon-open Wi-Fi
You brought a burner device, right? I didn't. What could possibly go wrong connecting an off-the-shelf device to an open network at DEF CON! YOLO.
Visiting the web page
I logged into the page on my webserver's bare IP address, watched the board, and… nothing. I reloaded it; nothing. I looked around to see if any of the participants looked like they might've found something; still nothing. Rats.
Jan and Pat1 were participants sitting near where I was setting this up. I needed their assistance but didn't want to outright ask for it. I started posing innocent questions to Jan: "Hey, what are you working on? What's Wireshark?" While they kindly explained in general terms, they were understandably more interested in their own project than tutoring a passerby. Pat was more willing to teach me and I pulled up a chair to sit with them. They patiently answered my questions and pointed to interesting things on their screen. They also noticed fairly quickly that I was regularly reloading a page on my phone as I watched them. "Hey, uh, are you trying to get caught?" "Maaaaybe…" "Why?" I gave them a quick explanation of my project and they instantly bought in:
Pat: Do you think this'll work?
Me: Probably not, but it's worth a shot.
Pat: Oh, wow. If it does, this will be legendary!
I had a helper. Soon after, Jan noticed we were up to something, leading to one of my favorite exchanges at DEF CON:
Jan: Are you two trying to get something up there on the board?
Jan, wide-eyed: Who the hell are you?
Thank you, Jan. I felt like a bona fide Security Researcher after that.
Another random visitor saw us huddled and asked if we were trying to hack something. Jan looked at me, looked at the visitor, said "nope", and looked back at me. I winked at Jan. Jan nodded back. The visitor squinted at us and walked off. Jan had my back.
Social engineering a Shepherd
After experimentation, we had usable Wireshark captures of me logging into my website. However, they weren't being displayed on the Wall of Sheep. It turned out that my assumption was wrong: we had to demonstrate the capture to a "Shepherd" running the contest. Pat called one over. We showed them Pat's capture, but they weren't convinced at first. Most website logins are through a form POSTed to the server, not through HTTP Basic authentication. The Shepherd was also skeptical that the login was successful because the server was returning the default "welcome to Nginx!" page and not something personalized for the (obviously fake) username. I leaned very hard into the "innocent observer" role, asking questions like "but isn't that what a successful capture looks like?" and "golly gee, it looks right to me. Don't you think?" and "it looks suspicious to me, too, but couldn't we try it and see what happens?" Our Shepherd seemed almost ready to go along with it — until they burned my plan to the ground.
I asked the Shepherd how a login goes from being captured to being shown on the Wall of Sheep. Their reply doomed our fun: "I'd type it in." Oh no. That's not good. "Isn't it automatic?", I asked. The Shepherd paused to rub the bridge of their nose. "Well," they sighed, "it was until people started sending a bunch of vile usernames and passwords and kind of ruined it2, so now we have to moderate the process." I wasn't giving up, though. "Could you type that username to see what happens?" "It'd just show up like that," they replied. "Could we try it?", I pleaded. "I mean, it's just text. Um, that's not a web page", they countered.
And then for the first time ever, I saw a flashing cursor down in the bottom corner of the Wall of Sheep. My heart sunk. "Is that Excel or something?" They grinned: "it's just some old software we run."
That's when I formally gave up on this attempt. If it were ever possible to hack the Wall of Sheep, it wasn't on that day. That doesn't mean I'm abandoning this forever, though. Next year, I'm going to make a smarter effort, by:
- Setting this up in advance. Again, Vim over SSH on a phone sucks. I'll have the fake login working before I leave home.
- Getting there earlier. If the Wall of Sheep is ever going to be automated and rendered in a browser, it'll be at the opening of DEF CON before anyone's polluted the waters.
- Using a more common authentication method than HTTP Basic auth, like a typical login form.
- Making the resulting page look like I'd really logged into a legitimate service.
- Bringing a burner device, because putting my own personal device on that specific Wi-Fi network was not the best idea I've ever had.
And if Jan and Pat are around, I'm recruiting their help again.
I didn't get anyone's names, or their permission to describe them. Fake names are all you get. ↩︎
I appreciate the irony that I'm complaining about hackers getting stuff to show up on the Wall of Sheep in a post where I'm talking about getting stuff to show up on the Wall of Sheep. The first rule of a good prank, though, is "don't be a jackass and ruin it for everyone else". I was going for something that I hoped the Shepherds would find amusing and wasn't trying to get racial slurs and other vile junk to show up on a big screen. Don't be that person. ↩︎