Show HN: I Dedicated 4 Years to Mastering Offline Password Cracking

Hi everyone,

I am Bojta Lepenye, and first of all, I want to thank the core developers of Hashcat. In my experience, it is quite literally the most capable tool available for offline password cracking across a wide range of use cases.

I have spent the last 4 years (from age 14 to 18) extensively working with Hashcat and the tools surrounding it, and I have documented what I have learned throughout that time (since January 18, 2022) in my first book. During that period, I also had to continuously update and rewrite major sections as the field evolved. One example was the introduction of GPU support for Argon2 and other memory-hard password hashing algorithms, which significantly changed some cracking workflows.

My passion for this book, or its “quick starter,” if you will, came from an ethically conducted penetration test I performed with full authorization at my school. This is something I am both hesitant and quite proud to acknowledge.

At the beginning, I simply wrote down everything I had learned from YouTube videos and online blogs. However, not long after starting my project, I realized I practically knew nothing about password security, and that small 10 to 15 pages I had written would never be enough if someone was looking for a professional guide to cracking passwords.

The other main driving force behind the book was the fact that while researching online, browsing forums, reading academic papers and white papers, watching videos, exploring blogs, inspecting presentations, and examining infographics, I did not find a single source that comprehensively covers and explains everything one needs to understand about offline password cracking. Literally. Not one.

Therefore, I continued my research and learned about password hashing algorithms, the security properties of hash functions, advanced hash cracking techniques, password analysis, attack optimization, and much, much more.

From the very beginning, I wanted to share this knowledge with the community because having access to a resource like this would have helped me tremendously when I first started learning password cracking.

I sincerely hope this work will be useful to both beginners and experienced professionals alike, and I look forward to hearing your thoughts and feedback.

I have also put together a little video to give you a little sneak peek into it. It is on Google Drive. It is the official domain, and you do not need to download anything. Here it is: https://drive.google.com/file/d/13LeysSZO8Mx-LGKt8UQjUGBKOYH...

If you are interested, the book is now publicly available on Amazon, and can be read for free with a Kindle Unlimited subscription: https://www.amazon.com/dp/B0GX36XRCD

254 分 | 作者 bojta-lepenye 1天前

21 条评论

  • raphman 1天前
    Thanks for sharing. This looks interesting. Impressive achievement.

    This book is currently not really relevant for me, so I just skimmed the samples on Amazon. I found the technical content to be reasonably accurate and interesting although sometimes a little bit verbose (e.g., the section about 'what is a password') or slightly imprecise. In general, I think this book might have benefited from a thorough copyediting pass. There are quite a few grammar errors and unpolished sentences in the book, e.g.:

    > The reason why Linux is imperative is that well, for one, most of the tools we will use, while indeed have builds for other systems, like Windows, in this book we will work with Linux.

    Wishing you success and keep on writing!

    • copypaper 20小时前
      Yea after skimming the samples on Amazon I noticed that nearly every single sentence had at least one comma in it (adding zero value). It feels like I'm reading someones thoughts.

      Personally, I love abusing commas for comments and shitposting, but they should be avoided in informative resources like books, otherwise, it looks like a word salad. Say your thoughts and ideas with boldness and certainty.

      But hey you write better than I did at 18, so I ain't judging. Just trying to provide helpful feedback for you (the op) to improve on.

    • dugidugout 22小时前
      What did you find slightly imprecise?
      • raphman 20小时前
        A few small things. You might call this nitpicking. And, as I wrote, I found the technical details generally accurate.

        > "Then there is also the fact that having a fully-fledged graphical desktop environment running in the background at all times is not quite optimal to say the least. 99 percent of the time when cracking passwords, you will be staring at a black terminal filled with white text, so using Windows, which is especially GUI-heavy, is usually impractical unless you are specifically testing something or showcasing some process."

        I am reasonably sure that the Windows UI has rather little practical effect on hashcat's speed, and this thread implies the same: https://hashcat.net/forum/archive/index.php?thread-8958.html Also, 99 percent of the time when cracking passwords, I am not staring at a black terminal filled with white text.

        (I am generally taking it a little bit personally when the author directly addresses me and tells me what I am probably thinking or doing.)

        > "Behind a hash function are a series of complicated mathematical operations that make deriving the input from the output literally impossible."

        I'd argue that the mathematical operations themselves are usually not that complicated. More importantly, the whole book seems to be about ways to derive the (probable) input of a hash function from the output. It is not literally impossible.

        > "It is important to note, however, that hash functions are not truly random;"

        As the author writes elsewhere, hash functions are deterministic and not random at all. Calling them not truly random seems to imply that they are somewhat random.

        > "When encrypting a file or any kind of data with AES for example, the program leveraging AES will prompt you for a password. Yes, a password."

        Yes, this is a book about password cracking, but there are lots of cases where programs use AES with a computer-generated key and won't prompt you for a password. E.g., TLS.

        (Just to reiterate: I am not trying to diminish the author's work, I wanted to suggest ways for improvement. I might be wrong or overly pedantic.)

        • Cpoll 19小时前
          > I'd argue that the mathematical operations themselves are usually not that complicated. More importantly, the whole book seems to be about ways to derive the (probable) input of a hash function from the output. It is not literally impossible.

          I think you're not being pedantic enough here. "Probable" is doing some heavy lifting. And the phrasing is "derive the input," which I think is fair to say. The best you can do with a proper hash is discover one or more possible inputs, but you're not deriving them from the output; the output is just used to check the result. The many-to-one nature of a hash precludes determining the exact input.

          • raphman 18小时前
            Fair point. I was initially thinking about rainbow tables. Taking a hash and looking up associated passwords in a table feels like deriving to me - but I'm not a native speaker so I might have a wrong feeling here.

            (It is obvious that one cannot directly derive the exact input - but one can derive potential inputs and then use other means to find the exact one.)

            • Cpoll 17小时前
              To me, "deriving from x" means performing a mathematical function operating on input x. By my own definition, I suppose a rainbow table lookup is a derivation, but I wouldn't consider actually computing the table to be one. Hash-cracking is more like guess-and-check than mathematical decoding; the hash to be cracked is just a verifier and not an input, which is why I make the (admittedly pedantic) distinction.
        • ofrzeta 11小时前
          > (I am generally taking it a little bit personally when the author directly addresses me and tells me what I am probably thinking or doing.)

          I think it's a canonical way to generalize the audience as in "99 percent of the time when cracking passwords, one will be staring at a black terminal filled with white text" just as in the German "man". So with that in mind maybe you no longer have a reason to be offended :)

      • jfarina 21小时前
        It's awkwardly phrased and doesn't really say what it intends to (though, the meaning is obvious after reading it a second or third time).

        As for it being imprecise, it doesn't talk about any specific software that has any compatibility issues. It dismisses the topic out of hand.

        • arcfour 20小时前
          I do think we should keep in mind the age of the author, which still makes it a very impressive achievement!

          There being room for improvement is both acceptable and expected.

          • raphman 9小时前
            I absolutely agree. There were no other comments on this post when I wrote my comment. Thus, I wanted to encourage the author and provide some constructive feedback in case nobody else would reply.
    • nojvek 15小时前
      In this day, I actually appreciate imperfect human written content.

      Too much AI slop, perfect grammar but no substance out there.

      This seems like a substance filled book.

      Congrats on shipping a book.

  • eigenrick 23小时前
    This is an amazing achievement for someone of any age, but to publish a book with this much research at 18 is phenomenal. I heartily congratulate you.

    I've hopped through the book and it seems carefully laid out and organized. I may come back at you with questions once I've read further. Cheers.

    • MattPalmer1086 10小时前
      I'll add my congratulations too.

      I work in info sec - I've always been interested in password cracking and hashcat specifically, but have never had the time to devote to really dig into it. I'll check it out.

      Well done!

  • K0balt 7小时前
    It’s always exciting to me when someone who has been so obviously passionate and obsessed with a technical discipline decides to take the time to write down what they have learned to help others. This is literally the foundation of civilization and what makes me happy to be a post-agricultural human. So, thank you.

    I have followed a similar path in other technical subjects, and have authored a couple of books on those journeys. I look forward to reading yours.

    Some people have brought up style and structure issues with your book.. try to take this in stride. Writing for publication is its own whole thing, and involves a lot more than just putting ideas to print. Creating text that conveys the spirit, personality, and information that you want it to is nontrivial, and it takes time and practice to master. It’s easy, as a reader, to feel the rough spots in a literary work… but that does not mean that the reader would do any better when confronted with writing a book level tome, so hear the critique but don’t overthink the critic.

    Even though writing well was a side quest to my otherwise very technical focus, I found a joy in developing my literary voice… and I would encourage you to keep uncovering yours.

    Don’t be bullied into writing “correctly”. If you want to ponder the senselessness of life you can read one of millions of “correctly” written papers that will have you wanting to end it all just so you don’t have to go on. In these informative but wasted pages you won’t find a shred of the author, and only find yourself bored by the subject that so enthralled them to spend a thousand hours or more writing about it. What a wasted opportunity. They became so focused on writing correctly that they lost their voice entirely. Their writing may inform, but it will rarely inspire.

    In these little bits of your writing I have skimmed so far, there’s plenty of warts but I feel you in the work. Your passion is contagious, and I am encouraged to learn. Sure, work out the warts, but don’t be bullied into writing “correctly” by sticking to formality and convention.

    Writing is about informing, inspiring, and guiding the frame of mind of the reader. Your work does that because your voice shines through. Sure, it could be easier to read, sometimes clearer, and you should work on that if you want to, but don’t sacrifice your voice in the process. The best written work has a definite personal opinion on how to write a voice, and it’s usually not the “correct” way.

    Humans writing like humans is what makes writing worthwhile in the third industrial age. Frolic in your humanity and keep up the good work. Don’t let the well intentioned bastards keep you down, especially if they have a point.

  • gabrielsroka 1天前
    Great job. The book is 427 pages.

    Why not put the video on YouTube?

    • bradgranath 22小时前
      Are you drunk? He’s lucky Google and Amazon haven’t noticed yet. If he wants to keep access to his accounts he should pull them down immediately and distribute via torrent.
      • isityettime 22小时前
        Why? Don't they both sell other books on cracking and pentesting and whatever? There are tons of videos on YouTube about hashcat and aircrack-ng and rainbow tables and blah blah blah.

        You think this stuff is some kind of secret or illicit knowledge?

        The video is just less than half a minute of him flipping through some pages in the book anyway.

      • Tamklomo 21小时前
        Because of a Hashcat tutorial book and video?

        Even Claude will help you setup hashcat and co without complaining?

  • ViAchKoN 21小时前
    Nice job! It is a massive achievement to publish a book let alone to be start a career so early at age! Now need to find time read the book. It seems it be quite interesting.
  • chadbennett 12小时前
    I just bought the book and look forward to reading it. I also started in cyber at 14.

    These are the kinds of real-world constraints where you actually learn how tools like Hashcat work under pressure.

    You are going to do big things in the industry!

  • andai 1天前
    Congratulations! The book looks great.

    I would love to hear more about the process of writing and preparing it for publishing. It's self-published? How did you do the typesetting and the diagrams?

    • TeaVMFan 22小时前
      I too would be interested in hearing about the writing and formatting process. I described my own process as a software engineer and first-time novelist here: https://frequal.com/forwriters/
  • aqsa_sajjad 21小时前
    This is a really impressive project, especially starting at 14. The point about there being no single comprehensive resource rings true, I've tried to learn about password security before and always ended up jumping between five different tabs just to understand one concept.
  • mmastrac 21小时前
    I've got an old datacenter KVM with a root password I've been unable to crack, even though it's an ancient DES one.

    Does anyone have a good cloud-hosted password cracker? I can't seem to brute force it, no matter how long I let John the ripper run.

    • arcfour 19小时前
      An EC2 instance with lots of cores like a c6i.32xlarge should do the trick, no? You could even pay for spot instances and just checkpoint frequently and copy the progress file to S3 when you get the interruption warning.
  • gettingoverit 18小时前
    Nice to see someone going the same path as me!

    Haven't read the book or used Hashcat, I have a question. Is there anything yet to generate rainbow tables out of password regex?

  • sijmen 1天前
    Congratulate on finishing such a big project on a complicated topic, and putting in all this effort so that others can learn as well. I enjoyed reading the first few pages on Amazon
  • Footprint0521 22小时前
    The video url is down? This sounds super interesting!
  • amelius 21小时前
    Ok, so what should we use instead of passwords?
    • analogpixel 20小时前
      I use a blank password for everything, no one ever thinks of trying nothing.
    • akimbostrawman 5小时前
      Depends on for what.

      online services/anything you can autofill with pw manager:

      random generated password as long as possible + MFA like hardware token (UF2)

      FDE device/pw manager/anything you can't autofill:

      Passphrase containing at least 8 random words (Diceware) + if possible MFA like keyfile or hardware token

    • giuscri 21小时前
      passkeys are the obvious answer, but not sure
    • coolThingsFirst 18小时前
      MFA authenticator app AND password is almost unbreakable. Unless the CIA wants to hack you, you'll be fine.
  • nilirl 22小时前
    I love the book cover! Great job, Bojta.
  • kelsey98765431 23小时前
    can you discuss your coverage of password mask attacks, specifically is there any advances since EBM
  • paulpauper 22小时前
    relevant https://en.wikipedia.org/wiki/2022_LastPass_data_breach

    probably a lot of ppl lost crypto this way.

    • Tamklomo 21小时前
      I don't think so. Every lastpass vault is encrypted by the users password.

      Wikipedia states that there were some field unencrypted, sure, but not the critical data.

      More people probably lost crypto by forgetting their passwords like a friend of mine. 10k gone

      • maerF0x0 21小时前
        This is misleading, if not false, for a sufficient many accounts, particularly early adopters of LastPass.

        https://en.wikipedia.org/wiki/2022_LastPass_data_breach#Impa...

        Many early vaults had an insufficient number of rounds, and though the new account default was upgraded over time, the old vaults never were. So longer time customers were very exposed by this breach. Most impactfully by the incompetence they demonstrated by not upgrading vaults.

  • latchkey 22小时前
    when i was running 150k amd gpus... i really wanted to use the cluster to run hashcat to help people recover lost things. i couldn't convince management that that was a profitable business to run.
    • dantillberg 21小时前
      > help people recover lost things

      You mean "lost things" in quotes. Management may have been more concerned about jail time.

      • Tamklomo 21小时前
        Plenty of valid reasons to recover lost things and not just 'lost things'.
        • latchkey 21小时前
          Yes that was what i was implying.
  • mdhemalakhand 3小时前
    [flagged]
  • Dinhhoanghm 7小时前
    [dead]
  • immanuwell 8小时前
    [dead]
  • saberience 22小时前
    There’s a reason there are no books about this, because most people are not interested in cracking local/offline passwords.

    In fact, the people most interested in password cracking are usually criminals.

    But good luck with the book. It’s just not a hugely in demand topic.

    • K0balt 1小时前
      Tons of people in it service occasionally would like to crack local passwords for clients. It’s a big world. That’s thousands of people needing to do this every month. More than enough to make a self published book worth publishing. I’ve sold a few books that even though they maybe only sell a few copies a month have made me more than 250k over the years. Slow returns, but it’s the gift that keeps on giving.
    • virtualritz 21小时前
      When I lived in Adelaide, Australia 2006 or 2007, flexible-neck LED lamps that you plugged into an USB port to have light on your keyboard (backlit keyboards were not the norm on laptops) were a novelty item.

      People simply didn't /know/ about them/that they existed at all.

      I went to a computer/electronics shop in town and asked for them.

      The guy told me: "We don't stock them because people don't ask for them."

    • papascrubs 21小时前
      Uh, what?

      I'd say that this is a bit relevant to the entire field of cyber security and a good chunk of development roles. If you're not concerned about how password hashing (which is a key component of understanding cracking) works as developer-- I'm not sure what to say. While not all of the in-depth research is probably needed. It's definitely relevant to many technical fields. I work in offensive security and we use tools like this daily in our industry. And no we are not cyber criminals.

    • Tamklomo 21小时前
      The reason is, that using hashcat is not complicated for people who have linux experience and the amount of people wanting to crack a password is probably not that high.

      Otherwise you do find plenty of people on YT walking you through hashcat. The first YT Video alone has 7 Million views: "how to HACK a password // password cracking with Kali Linux and HashCat"

      I wish him luck, great drive to do this, i hope it works out well enough, books are just in general not easy to sell.