Cyber Security / Ethical Hacking
  • Prologue
  • CTF/OSCP Prep
    • Fundamentals
      • Linux
        • Basics
        • Bash Scripting
      • Windows
        • Basics
        • PowerShell
          • Scripting
        • CMD
      • Kali Survivor Skills
    • Information Gathering
      • Passive Recon
      • Active Recon
    • Enumeration
      • Common Ports
      • Vulnerability Analysis
    • Exploitation
      • Shells
  • Binary Exploitation / Exploit Development
    • Useful tools and techniques for Binary Exploitation
    • Shellcoders Handbook
      • Chapter 2 - Stack Overflows
        • Linux Buffer Overflow With Command Injection
        • Linux Buffer Overflow Without Shellcode
      • Chapter 3 - Shellcode
  • TryHackMe
    • Linux Fundamentals
      • Linux Challenges
      • RP: tmux
      • Common Linux Privesc
    • Advent of Cyber
      • Inventory Management
      • Arctic Forum
      • Evil Elf
      • Training
      • Ho-Ho-Hosint
      • Data Elf-iltration
      • Skilling Up
      • SUID Shenanigans
      • Requests
      • Metasploit-a-ho-ho-ho
      • Elf Applications
      • Elfcryption
      • Accumulate
      • Unknown Storage
    • Web Application Security
      • Web Fundamentals
      • Juice Shop
      • WebAppSec 101
    • Linux Privesc Playground
    • Intro to x86-64
    • Ninja Skills
    • CC: Radare2
    • Reversing ELF
    • Intro to Python
    • ToolsRus
  • Programming
    • Python
      • Simple TCP Port Scanner/ Banner Grabber
      • Botnet
      • Keylogger
      • Nmap Scanner
    • Golang
      • Execute Commands
      • MAC changer
      • TCP Port Scanner
      • TCP Port Scanner (improved with goroutines)
      • GoNmap Scanner
  • Protostar
    • Stack 0
    • Stack 1
    • Stack 2
  • Web App Pentesting
    • Recon
    • Authentication (Portswigger Academy)
      • Vulnerabilities in password-based login
        • Username Enumeration via different responses
        • Username enumeration via subtly different responses
        • Username enumeration via response timing
        • Broken brute-force protection, IP block
        • Username enumeration via account lock
        • Broken brute-force protection, multiple credentials per request
      • Vulnerabilities in multi-factor authentication
        • 2FA simple bypass
        • 2FA Broken Logic
        • 2FA bypass using a brute-force attack
      • Vulnerabilities in other authentication mechanisms
    • Broken Acess Controls
      • Insecure direct object references (IDOR)
        • Insecure direct object references lab
  • HackTheBox
    • Active
      • Untitled
      • Blunder
Powered by GitBook
On this page
  • Command Line Options
  • Analyzation
  • Information
  • Navigating Through Memory
  • Printing
  • The Mid-term
  • Debugging
  • Visual Mode
  • Write Mode
  • The Final Exam

Was this helpful?

  1. TryHackMe

CC: Radare2

PreviousNinja SkillsNextReversing ELF

Last updated 4 years ago

Was this helpful?

Command Line Options

Analyzation

Information

Navigating Through Memory

Printing

The Mid-term

Debugging

Visual Mode

Write Mode

The Final Exam

The first step to solve this crackme was to disassemble main and set a breakpoint at the strcmp function.

Looking at this code we can see that if the password we provide is equal to youdidit we solve the crackme. But its not so simple, because the password we provide before being compared with that string goes through a function called get_password.

In this function we can see that there is a loop. It seems to go though every character of our input and increment it by 9? until the value of var_4h is 7, or less than 8, and then returns the now modified input to the main function to be compared with youdidit. Much like a Caesar cipher with a key of 9. So let's try to input a bunch of a's as the password to see what happens.

We know that once returned to the main function, the value of our modified input is stored in rdi.

So our 7 a are now 7 k. Interesting! Looking at an ASCII table we can confirm the the shift of the characters was an increment by 9.

So all we have to do is take the string youdidit and decrement it by 9. We can use a programming language to do this or we can just do it by hand looking at this chart. We end up with the string oekZ_Z_j. We can now test it in the debugger.

We can see that we have managed to match the string youdidit