Code

How Programmers Hack Software: 8 Examples of Hacking

How Programmers Hack Software: 8 Examples of Hacking

Learn: Cybersecurity Specialist Profession

Learn More

Being a programmer with skills in website layout and server configuration is truly impressive. However, the real advantage is the ability to understand the inner workings of programs, which allows you to adapt them to your needs. On the Hacker News forum, experienced IT professionals shared their stories, which we have collected for you. These examples demonstrate how a deep understanding of technology helps not only in solving current problems but also in creating unique solutions that meet specific requirements.

Found a pattern in Tetris and became a champion

I spent a lot of time playing Tetris Friends, and over time, I began to experience a sense of déjà vu. When I started a new game and placed the first 10-20 cubes, I had a feeling that I had already encountered this combination in previous games. To confirm my theory, I decided to conduct an experiment using brute force. I started a new game, recorded the placement of the first 10 cubes, and then restarted the game. I repeated this process many times until I finally stumbled upon a combination that was identical to one of the previous ones. This experience got me thinking about patterns in Tetris and how predictable some setups can be.

Image: tetris.com

In Tetris Friends likely used a limited set of seeds, which could be around 256 possible combinations, to generate dice combinations. This means that when starting a game with the same seed, players will receive the same combinations of dice. This approach to generation simply limits the variety of the game experience and can influence player strategy, since the predictability of the pieces falling reduces the element of surprise.

In Tetris Friends, users had the opportunity to compete with players from all over the world. The platform offered a leaderboard, which could be reached by completing 40 lines the fastest. I decided to use AutoHotkey to achieve first place in this competition.

I restarted the game multiple times, striving for the perfect seed, and then played carefully and recorded my actions using an AutoHotkey script. It is important to note that Tetris Friends was a Flash game, so it was necessary to set a small delay before each move. This approach allowed for increased game efficiency and improved results.

Testing and debugging the program proved extremely difficult. I kept restarting the level until I found the right seed. After several hours of persistent work, my script finally worked, and I took first place in the world rankings. This victory brought me pride for an entire week until the developers updated the leaderboard.

Saving the Olympics Broadcast

I lived in Sydney and worked for a telecommunications company that launched live broadcasts. At the time, I encountered a serious problem: a bug that prevented the correct transmission of the signal from the opening ceremony of the London Olympics. Less than a day remained before the final rehearsal, and the company was ready to replace all the radios in the studio to fix the problem.

Opening ceremony of the Olympic Games in London Image: olympics.com

As a result, I decided to hack the firmware of the radio station, bypassed the signal processing and began transmitting raw data from London directly to the studio in Sydney. The client was very pleased with the broadcast quality, and two years later chose our radio stations to broadcast the Winter Olympics in Sochi.

Dealt with a data leak in C

In my first job, I was faced with the task of optimizing a database that was gradually consuming more and more memory, eventually causing the system to crash after just a few hours of operation. The software was written in C, and at the time, tools like Purify and Valgrind didn't exist to simplify the troubleshooting of memory leaks. This task turned out to be difficult and unpleasant, and many colleagues were not eager to solve it.

C programmers are actually really cool guys. Image: Public Domain

When studying code I noticed that the standard malloc and free functions were being used for memory management. I decided to replace them with my own functions declared in the header file: my_malloc and my_free. These functions take __FILE__ and __LINE__ as parameters, which allows me to track the call site. I then recompiled the program using macros that redirect all malloc and free calls to my own functions. This change improves error tracking and memory management in the code.

I recorded all function calls in a separate file, including the addresses of allocated memory, file names, and line numbers. Once I had accumulated enough data from the test runs, I sorted them by addresses. Each address should correspond to a pair: malloc and free. The absence of a pair indicates a problem. This way, I was able to identify all the problematic file names and promptly fix them.

I told the company about the vulnerability

I applied to a medical marijuana company in Canada before it was legalized. This company is actively developing the medical cannabis market, offering innovative solutions for patients and medical institutions. My experience and knowledge in this field can significantly contribute to business development and improved product quality.

I was curious whether the company employees had accessed the web page with my portfolio. I decided to find out for myself: I analyzed my web server logs, found the company's public IP address, and checked it on shodan.io. During the check, I found an interesting detail - one of the ports was open for the BACnet protocol. At that time, I was not familiar with this protocol, but I quickly found a program capable of interacting with it.

Shodan.io service interface Image: shodan.io

By connecting to the IP address through an open port, I discovered a vast list of available information, including water levels, temperature, lighting, and more. While I could control these parameters, including turning lights on and off or changing the temperature in the plant rooms, I had no intention of using these features for illegal purposes.

I reported the vulnerability I'd discovered to the company recruiter. It was a risky decision, but it paid off—I was hired. My first task was to fix the open port, which improved system security.

I'm not entirely sure if this qualifies as "hacking," but I'm proud to have identified a vulnerability in the system. My discovery highlights the importance of security and the need for constant monitoring to protect data. Discovering such vulnerabilities allows us to improve systems and prevent potential threats.

Hacked a school computer

Primary school, during the era of Windows 3.x operating systems, became an important stage in the educational process. At this time, computers began to be actively integrated into the educational process, opening up new horizons for learning. Windows 3.x provided users with a user-friendly interface and a variety of applications that made educational materials more accessible. Teachers and students began to master the basics of computer literacy, a crucial step in preparing for the future digital age. Modern technology-based educational methods trace their roots to this period. Windows 3.x became a symbol of the digital transition in education, influencing the development of the skills needed for success in school and the workforce of the future.

Strict rules were in effect in all classrooms: games were prohibited during lessons. Teachers took action by blocking access to all games built into the operating system. However, this didn't actually stop the students.

We discovered an interesting trick: after opening any program, such as Wordpad, you can go to FILE → OPEN and find Minesweeper there. This is a simple and quick method that allows you to bypass any restrictions.

Image: Wikimedia Commons

Bypassing school restrictions becomes a real manifestation of creativity and ingenuity, allowing him to feel like a real "hacker." Such activities not only develop thinking but also develop problem-solving skills that can be useful in the future. It is important to remember that such experiments emphasize an interest in technology and allow children to develop unique strategies for achieving goals.

Wrote a parser for searching apartments

In the 2010s, I searched for an apartment for rent on sites like Craigslist and Kijiji. These sites had a clunky interface, which complicated the search process. For example, there was no map with apartment locations, which made the choice less informative. When a new apartment appeared on the site, you had to act quickly to have time to book it before other users. This experience shows how important a user-friendly interface and functionality are for a successful rental housing search.

I developed a script that parses data from several sites and displays apartments on a map. During the process, we implemented a filter that allows users to quickly find suitable housing. The system automatically contacts landlords who provide their email addresses, checks apartment availability, and sends notifications with links to current listings. This greatly simplifies the housing search process and saves time.

Interface of the developed programImage: btbuildem

The parser turned out to be very effective, which prompted me to scale the system to additional cities. Every time I found a suitable location, I created a website with the scraper and shared it with friends. As a result, my project received recognition and even won an award on cira.ca.

I decided to shut down my project after learning about a lawsuit between Craigslist and PadMapper, which were facing similar issues. However, the main factor in my decision was that my site wasn't generating the profits I expected.

Another school computer hacker

Chromebooks, which replaced netbooks, were used in elementary school for a while. I had an interesting experience while using them. Chromebooks, being lightweight and functional, turned out to be convenient for teaching. Their ease of use and access to cloud services made classes more effective. It is important to note that my experience with Chromebook has given me a better understanding of the potential of modern technology in the educational process.

Chromebook laptop appearanceImage: arstechnica.com

All popular Flash game websites were blocked at school, so my friends and I downloaded a lot of them and hosted them on our own website. We used a simple web server to upload the games. Even though our HTML and CSS weren't perfect, the site worked and allowed us to enjoy the games.

The school had no way to block it because it was on the local network. We took advantage of this situation and shared the IP address with our friends so they could connect to the server. This allowed us to create our own space for socializing and gaming, despite the restrictions imposed by the school.

Developed a remote key to open a car

Several years ago, I worked for a company that specialized in the production of premium cars. Our goal was to present a new product to convince clients from the head office of its investment appeal. We proposed an innovative solution: the ability to open a car not only with a traditional key but also with a smartwatch. This solution highlighted current trends in the automotive industry and met the needs of customers seeking convenience and technology.

Our team's lead developer proposed an innovative solution: installing an Arduino controller for remote opening. On the day of the presentation, when customers came to see the project, the demo version functioned flawlessly. The successful presentation made a positive impression, and we received the necessary investments for further development.

Arduino board Image: Wikimedia Commons

Read also:

  • The language of the gods: why hackers love Lisp and how to achieve enlightenment with its help
  • Test: guess where a real hacker attack is and where it is not
  • How to learn Python on your own and for free: algorithm

Profession Specialist in Cybersecurity

You will develop analytical thinking, learn to search for vulnerabilities and ensure the security of IT systems. Master a sought-after profession even with zero IT experience. The course program is the most comprehensive on the market!

Find out more