How I Became the Author of a Book on Hacking and Physical Breaking

WILD

Administrator
Staff member
ADMIN
SELLER
SUPREME
MEMBER
Joined
Jan 21, 2025
Messages
219
Reaction score
631
Deposit
0$
The road will be mastered by the one who walks.

Chris Kaspersky

I never wanted to be a writer, but it turned out that I wrote a book about unusual hacking techniques and methods of physical attacks using homemade hacker devices. The publisher has already sold 1000 copies of my book and is now printing the second edition. How the idea of this publication was born, what difficulties I had to face and how to learn how to hack networks using cheap single-payers and a mobile phone, I tell in this article. Perhaps my experience will be useful to those who decide to repeat this path.

Since childhood, I thought the magazine “Hacker” is truly a cult. I remember those glorious times when he lay on the shelves of kiosks with printed products and my mother every month bought a fresh room. True, she read it mainly herself, but after a while I also became interested in this publication.
Modest collection of journals "Hacker" (in chronological order)
Modest collection of journals "Hacker" (in chronological order)

Many years later, in 2016, I got a job at the Ural Security Systems Center and wrote a first article for our corporate blog at Habr. Even then, I firmly decided that I would ever grow to Hacker. In those days, as, in general, and now, in the Russian information community, Hacker was considered one of the most authoritative publications.

This plan was implemented four years later: I prepared a note on the topic of information security, looked at the Hacker website in the section “Contacts” and sent my text to the direct editor-in-chief Andrei Written. Exactly 24 hours later, an e-mail came to me the answer that the article had been accepted, and two weeks later it was published. So I became the author of Hacker.

I, in general, did not plan new articles at that moment, but after a couple of months Andrei wrote me again and asked me to prepare something else for the magazine. Our company just conducted a series of very interesting pentests with complex cookies - the development of attacks in the internal network after the penetration of the perimeter, and I suggested writing a few materials on this topic. The text was based on well-structured notes that I have been making for a very long time (which once again proves the practical benefits of such “working diaries”) – and the result was unexpected: the article hit the cover of “Hacker”. For me personally, it was a dizzying success! Despite the fact that at that moment I was preparing for OSWE and I did not have much free time, I decided to continue the topic of post-exlocuting in the next three articles.

Further events developed in an even more amazing way. A year after the beginning of my career as a regular author of Hacker, I wrote the lead editor of the magazine Valentin Kholmogorov and reported that periodically Hacker publishes books composed of selected articles, which this time included my work. I didn’t even dream about the book at the time, I just didn’t know what you could do. When I held a real book, on the cover of which my name was listed as one of the co-authors, literally something changed in me.
Unusual feeling when you are looking for a book in the store for your own authorship
Unusual feeling when you are looking for a book in the store for your own authorship

We had to move forward. And I set myself the goal of writing a book, but not in collaboration with colleagues from Hacker, but completely independently.
The Birth of an Idea

In the company of the UCSS, where I work, there is a scientific and technical council, at which I was once offered to make a small report. At the end of 2020, I was looking for alternatives for hacker devices (hak5) that could be collected from the available single-payers and other improvised devices. As a result, I managed to repeat almost all the most popular devices, make them flexible and, probably, much more functional compared to prototypes. In my report I also included a description of specific physical access attacks, the implementation of which I was then able to find on the Internet and try with the help of the equipment I collected.

I made a report, but I wanted someone else to learn about my work, except the members of the scientific and technical council. And I decided to set out my research in nine detailed articles, which I wrote a little over the next half of the year. And when I received a copy of my previous articles from Hacker in the summer of 2021, I realized that I had great material for my own book. Nine articles detailing various aspects of hardware hacking and in the details describing the architecture of homemade hacking devices are a very valuable asset!

Throughout the second half of the year, I have now written not articles, but future chapters – at that time the material was a boring description of the technical details and, obviously, required a more understandable and simple presentation. In addition, visual diagrams and photos were needed.

At the end of 2021, I decided to inform Andrei the Writer in Hacker that I have great material that I plan to draw up in the form of a book. He redirected me to the “main on the books” – Valentina Kholmogorov. Valentine soon sent a rather skeptical, as it seemed to me, the answer: they say, books on this topic have already been published, and in large numbers. But in general, he expressed readiness to contribute to the publication - if, of course, the text turns out to be worthy. I was completely sure of my work: the material I collected was unique, no one published something like this before. And I continued to work.

The whole of 2022 I devoted to the finalization of the book. 90-100 pages of the original manuscript suddenly turned into more than 200. But the most difficult thing is the photos... If the book was devoted to attacks on the network or application, I could get off with banal screenshots. Another thing is physical attacks. Here, the stand is already real objects, sometimes large ones, and to demonstrate the attack requires a certain context. I needed to somehow convey in the photo and the situation surrounding the hacker, and at the same time a tiny text on the phone screen. Some photos I borrowed from the reports on pentests and real cases, but a lot had to be played on the stand. At the same time, some pictures were taken in the winter, others in the summer ...

As a result, I was planned for a photo shoot all year. Some shots were so difficult to make that it was necessary to ask permission to shoot from the administration of an object, so that later I was not made the main suspect in any offense. However, in the field of information security there is another feature related to photos - it is necessary to hide all confidential and personal information. Therefore, I had to smear an innumerable number of MAC and IP addresses in the pictures.

Probably, it was possible to write this book for more than one year, gradually adding all the new material, and interesting ideas I were born when working on the manuscript constantly. But at some point I began to realize that part of the written material is gradually becoming obsolete, besides, there is a risk that someone can be a banal ahead of me with a similar topic. It was time to end with the production process.

Usually I try to achieve some tangible results in my work in a year, for example, to get a certificate or make a report at the conference. 2022 was not easy, and I wanted to mark its completion at least some result. Therefore, on the very last working day of the year, when across the country people are already scrolling champagne, cutting salads and tearing away at corporate parties, I again wrote to Valentina Kholmogorov that the work on the book is almost complete. And immediately received the answer: once it is completed - we will publish. Apparently, the Hacker ledge by that time had already tested a little champagne. The year ended on a positive note!
Pre-printing training

In the coming 2023, I had to do at least half of the work on the book, however, then I had not yet suspected it. I was waiting for repeated reading of the manuscript and grinding of the text - this took a crazy amount of time. In total, I counted about 60 versions of the revisions of the document. Then it was necessary to format the text of the book in accordance with the special style template adopted by the publishing house. It took me three more months to do this. In parallel, the materials were published in the form of articles on the “Hacker”.

When the preparatory work was completed, a literary editor took up the manuscript. I reread my own chapters for a person who is fluent in Russian (unlike me), but is not fully understood in the technical intricacies related to the subject of the book. It was necessary to carefully check whether all the phraseduced proposals by the editor kept their original meaning.

Two months later, the corrector approached the work, checking the punctuation and placed in places the crooked commas (this is even worse with me).

Finally, the third stage came - the layout. And then I suddenly noticed something else that I had previously overlooked - the design of the code. Over the next three weeks, I found so many minor flaws that it entailed three more cycles of editing. And all for the sake of software code and configi in the book to be read as easily and beautifully as in IDE.

In total, another six months went to the final touches and sending the book to the printing house. At the same time, we have been negotiating a colorful seal for so long that the project almost failed – I really wanted the book to be full-colored. In addition, our 100 author's copies were then lost by the transport company.

The cover is the face of a book. From the originally proposed name on this very cover left only one word: “physical”, but it became the key. Much more important was the picture - it should reflect the essence, the main idea of the book.

I really wanted to show in this image the physical world, for example, a city as a digital object for attacks. But then I decided to do it simply – to make a reference to the game Watch Dogs (Saniscan Cholemy and Bridge) and the series Mr. Robot (man in hoodie). And of course, this person must hold a smartphone in his hand with something as recognizable and hacker on the display (for example, Metasploit). Abstract information flows in the sky of a fictional city should symbolize numerous objects for attacks, which are perfectly seen by a potential hacker, but do not see others.
This is what the illustration for the cover of AI looked like
This is what the illustration for the cover of AI looked like

Drawing such a picture is a very difficult task, but here artificial intelligence came to our aid. However, as it usually happens with the illustrations of Midjourney, the painted hacker for some reason formed two hoods at once, and in an imaginary city for some reason there were two bridges. At this stage, the designer yambuto connected to the work, which creates all the covers and graphic "entraying" to articles for the magazine "Hacker", she brought the picture to mind, removing everything superfluous on it and finishing the missing.
What's the book about?

Книга состоит из трех разделов. В первом описываются физические атаки, требующие прямого контакта, во втором — почти физические, позволяющие работать на расстоянии по радиоканалам, а в третьем — физические имплантаты — решения для фиксации в скомпрометированной системе. Разнообразия физических атак, конечно, гораздо больше. Но в книге я постарался включить только достаточно простые в исполнении и «чистые» — то есть не требующие вскрытия устройств и прочих актов вандализма.
Атака холодной обуви

Простая глава, с которой лучше начать чтение книги. В ней рассказывается, как легко можно извлечь данные из оперативной памяти компьютера, используя всего одну флешку, даже если у вас есть зашифрованный жесткий диск и надежный пароль для входа в систему.
Извлечение всех секретов из заблокированного ПК с помощью аппаратной перезагрузки.
Извлечение всех секретов из заблокированного ПК с помощью аппаратной перезагрузки.
RJ-45 нюхание

Очень красиво в своей простоте, эта атака позволяет стрелять по транспорту с помощью простых электрических зажимов, таких как «крокодил». Я не автор этой идеи, но я массово реализовал её на телефоне или в одиночной игре.
Перехват хэшированного пароля и загружаемого файла с помощью простых крокодилов.
Перехват хэшированного пароля и загружаемого файла с помощью простых крокодилов.

Это делает атаку вполне применимой в реальной жизни, но, конечно, не во всех случаях. Физические атаки проще понять и наглядно увидеть, поэтому они привлекают больше внимания. Кстати, после публикации этой главы со мной связались создатели одного из популярных YouTube-каналов и предложили снять видео на эту тему. Так мой текст был впервые экранизирован, и короткие ролики по этой главе набрали более трех миллионов просмотров.
BadUSB-hid

Посвятить книгу физическим атакам и не рассказать о «Резиновой уточке» — я просто не мог. Я добавил пару коротких команд для взлома ПК (которые, кстати, позаимствовал у ОБСЕ). Я также подробно описал интересный способ использования таких флешек для атаки на заблокированные компьютеры.
Самая короткая и универсальная команда для взлома любого компьютера под управлением Windows.
Самая короткая и универсальная команда для взлома любого компьютера под управлением Windows.
BadUSB-eth

Гораздо менее известная атака, описанная исследователем Сами Камкаром в его статье об атаке Poisontap, позволяет получить доступ к заблокированным компьютерам и обладает огромным потенциалом, но её гораздо сложнее осуществить, чем BadUSB-HID.
Извлечение хеша NetNTLM из заблокированного ПК и взлом другого компьютера.
Извлечение хеша NetNTLM из заблокированного ПК и взлом другого компьютера.

В своей книге я хотел показать, что BadUSB — это не только флеш-накопители-ключи, но и флеш-накопители-сетевые карты, которые вполне способны извлекать секреты из компьютеров, причем достаточно быстро.
Ананас

В этой главе я рассказал, как использовать общедоступные и недорогие компоненты для сборки устройства для атак на беспроводные сети. Главная проблема, которая чаще всего возникает при проведении таких атак, — это не самое удобное местоположение цели из-за ограниченного радиуса действия беспроводной сети. В результате хакеру приходится проводить много времени в опасной близости от объекта вторжения.
Удаленный доступ к Wi-Fi и разработка последующих атак.
Удаленный доступ к Wi-Fi и разработка последующих атак.

Я описал конструкцию такого хакерского устройства на базе Raspberry Pi Zero W, питающегося от крошечной батареи, при этом устройством можно управлять дистанционно через интернет. Это очень удобно, когда на улице -20 градусов, зона приема сигнала составляет пару квадратных метров, и холодные пальцы уже не могут нажать кнопку на телефоне.
Хакерский дрон

Это одна из самых интересных, но проблемных глав, содержание которой меня сильно обеспокоило. Я никогда не играл в Watch Dogs, но смотрел геймплей. Легкость и зрелищность, с которой была взломана игра, особенно с использованием квадрокоптера с дистанционным управлением, побудили меня повторить подобный трюк в реальности.

И вот какую атаку я придумал: дрон, оснащенный устройством Mousejack, способен взломать практически любое устройство за секунду, просто пролетев рядом с закрытым окном. Даже если цель находится на верхних этажах офисного здания.
Большое спасибо Диане за помощь в этой чрезвычайно сложной сцене.
Большое спасибо Диане за помощь в этой чрезвычайно сложной сцене.

Эта глава по-прежнему была проблематичной из-за фотографий. Я хотел показать на снимке типичное офисное здание с панорамными окнами, расположенное очень высоко и максимально неприступное для хакера с земли. Во время съёмки я снова чуть не столкнулся с проблемами — бдительные граждане и охрана боятся дронов, летающих вокруг офисов, и оператор может попасть в серьёзные неприятности. Если, конечно, его удастся поймать!

В дополнение ко всему, что есть в книге, я расскажу о том, как модернизировать дешевый «бытовой» квадрокоптер таким образом, чтобы он мог летать без потери связи с оператором на десятки километров и при этом успешно противостоять всевозможным «глушителям».
Мобильный

Самая большая глава посвящена взлому с помощью мобильного телефона. В целом, судя только по этой главе, можно было бы выпустить отдельную книгу.

Начиная с Nokia N900, любой телефон с ядром Linux для меня стал полноценным компьютером, на котором я постепенно осваиваю различные устройства.
 
Top Bottom