Live data from Hacker News

Ask HN: What's your proudest hack?

news.ycombinator.com

301–310 of 414 posts

Re: Ask HN: What's your proudest hack?

#301

Elementary school, Windows 3.x era. School district thought they blocked access to the built-in OS games. Nope, from any program (Wordpad, etc) you could FILE -> OPEN to find/launch/play Minesweeper. Nothing makes an 8-year-old feel more like a "hacker" than subverting school controls to play video games, while also gaining cred with your friends. The good ol' days.

In WinXP You could also use the File->Open in notebook to download URLs. It's also possible to have binary files that only consist of readable bytes that can be saved in notepad.

1 - probably you meant Notepad

2 - In all Windows versions you could do that. Notepad is rather an underrated program. You should really read Ray's entries about how Notepad works.

Re: Ask HN: What's your proudest hack?

#302
In Magento (but can be applied to any type of product really), I added XSS to all $_POST requests in code and managed to find an XSS. Even though it was self-XSS and I didn’t receive a bug bounty, it was a really simple way of finding it. I’m sure there are browser extensions that do the same but still. Same could be applied with SQL injections.

Re: Ask HN: What's your proudest hack?

#303
This isn't my most elegant hack, but it is the one I'm most proud of given both the stakes involved and the amount of learning I had to due under pressure.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

This is the story of how early in my career (~15 years ago) I saved the jobs of 100+ employees along with $20M+ of accounted revenue...

I had built an application that had become the core of a large and prestigious business (can't describe the software or business sector due to NDA). One night I get an alert that one of the drives in the server hosting the application was failing and needed to be replaced -- not a big deal since the system was running RAID-5 so it it could take a hit. So I contact the IT company providing service for the business and they sent out a tech...

.. who was a little green...

When they reconnected the drives to the motherboard they were out of order and the RAID controller went to work using the new (zero'd out drive) as part of the main array. The tech freaked out when the system wouldn't mount and then proceeded to swap the cables around several times while rebooting!!

This effectively "encrypted" the drives!

I get a call much later that night from a crying tech informing me that the machine is trashed and that the backups had failed!!

I immediately drive to the site and collect the hard drives to bring back to my home office, first thing in the morning I purchase several large drives to duplicate on to and return the original drives to the business so they can send them out to a pro data recovery company.

Upon examining the drives I learn that there are three different partition schemes across the four drives which are using RAID-5 with LVM, but with unknown RAID parameters...

So I start hitting the books, and by that I mean reading the source code for ext3, LVM, and MDADM -- at the time the relevant block level device driver code for MDADM was extremely terse, almost un-commented, and in German, which I do not speak O_O

I took several 16-20 hour days of pouring through sector by sector hex dumps of the drives, but I was eventually able to line up and decode the LVM header blocks and work backwards to find the ext3 superblocks and the start of the filesystem. I then wrote my own RAID-5 virtual loopback device driver that knew about the permutations in the data blocks caused by the drive shuffling and was able to extract a complete filesystem. After hand patching the superblocks I was able to mount it and recoverd all of the mission critical data!

Prior to this I only had an abstract sysadmin-level knowledge of Linux filesystems :)

Also, the pro data recovery firm wasn't able to recovery anything and tried to lie saying that the drives were physically damaged! The CEO and CFO had me sit in on the phone call and jump in to correct them, the tech from the recovery company was speechless and then accused us of trying to set them up! We (the C-levels and myself) had a good laugh and then went out to have a couple drinks ;)

Re: Ask HN: What's your proudest hack?

#304
In the early 2000s, the web hosting industry was still evolving quite a bit. We had recently started offering PHP and MySQL as an alternative to using Perl CGI scripts.

Then we notice the server is getting terribly slow. They were under a high load and finally my boss at the time figured out why: The disks were being hammered by database reads and writes.

I was the junior most among the three of us who managed servers, and I recall standing In a circle one afternoon discussing the problem and possible solutions.

We considered things like building dedicated database servers, And I really don't recall what else. But while I was thinking about the problem, any delightfully simple answer came to mind.

I presented my idea and it was adopted right away. Better than that, it solved the problem.

The hack? Install another hard drive and put /var/lib/MySQL on it.

These days that would be a terrible solution. But back then we were running things like Celeron 300s in giant 4U cases and had plenty of power and space overhead to make room for another disk

Re: Ask HN: What's your proudest hack?

#305
I was cleaning up some stuff on an old but still pretty important prod server and not paying enough attention on that day. Turns out in retrospect that accidentally deleting ~/.ssh/authorized_keys on the main user account was not a good idea.

As the panic was starting to sink in, I managed to find out that an unprivileged user account was still available for SSH login. Once I got a hold of it, I then tried my hand at running several privilege escalation exploits... until one of them worked (what a relief) and I could finally restore proper SSH access on the main user account.

It was both a proud and a pretty embarrassing moment.

Re: Ask HN: What's your proudest hack?

#307
post #146

I applied for a job at a medical cannabis operation in Canada right before legalization hit. I was curious to see if they had checked out my personal website, so I grabbed my webserver logs and I recognized one IP from the city the job was based in. More than likely, the public IP of the business in question. On a whim, I ran the IP through Shodan.io and it showed that 47808 was open - The BACNet protocol. I had no i…

Reminds me of the time I found a “warm introduction” referral, an open invitation to potential network management positions at a company, buried in their BGP/ASN infrastructure information. (It’s been about a decade so I don’t remember exactly what specifics the info was in, but you wouldn’t have found this specific email and opening line without mucking round with their BGP and ASN info.) I emailed but they weren’t…

Bandcamp once had an advert for recruiting a developer - it simply said "Check the headers" .... and this is where the trail began.

Although I didn't apply for the role it was a fun challenge solving steps along the way and I appreciate the effort put in making it.

Re: Ask HN: What's your proudest hack?

#309
Back in the day, I wanted to share savegames of Final Fantasy (for PS2) online. So I installed a modchip and then I built a TSR driver which would emulate the memory card and upload the savegame onto an FTP server instead.

Along the way, I noticed that the game still had debug printfs contained, so I built another little tool to replace their printf handler with my own. Seeing this diagnostics data for some odd reason made me very happy :)

Re: Ask HN: What's your proudest hack?

#310
I'm a script kiddie with only the most basic JS and Python knowledge.

I came upon an online contest by a food company where you had to submit pictures of yourself cooking with your kids using their products. People could then vote on the submissions (one vote per day / cookie) and the top 10 would win travel vouchers of between 500 to 5000 bucks value.

I found out they'd done that before in other countries where apparently you had to submit videos, because there were tons of them on YT. I then used screenshots from those videos to make fake submissions.

Then I found the url to cast votes, put them in a script within a legit advertising banner from a marketing campaign my company was currently running (I guess that's XSS?). I knew how many ad impressions each banner was to receive, so it would cast a vote only every 2k impressions or so.

I ended up making off with about 4 grand. I'm only partly ashamed because: The call to cast votes would also return the current vote count. So I'd cast a vote for each submission once a day and put it in a db in order to monitor the current rankings. Turns out there was another guy whose votes would go up by exactly 100 a day, so it was either him or me taking home the money.

I did this sort of stuff a couple times back when these exploits were more commonly possible (marketing people and their devs seem to have learned) and every single time there would be someone else who was also cheating. So really it was a hacker vs hacker (or rather kiddie vs kiddie) sort of battle rather than taking from the legit players.

Post reply on HN