Where should I start with self-learning white hat hacking?
I found the book ‘HACKING: The Art of Exploit’, but I’ve encountered some difficulties. Despite it being the second edition, the terminal responses use different letters, which is causing confusion.
Can you recommend current literature on white hat hacking for beginners?
I also have some technical questions:
-
CPU registers EAX, ECX, EDX, and EBX (called the accumulator, counter, data register, and base register respectively) are mainly used as temporary CPU variables when executing machine commands.
-
When trying to execute commands from the book on page 40, I encountered an error in gdb:
gdb -q ~/a.out
/home/user/.gdbinit:1: Error in sourced command file:
Undefined command: "". Try "help".
Reading symbols from /home/user/a.out...done.
(gdb)
Previously I was getting proper responses, but now I don’t understand what’s happening.
Help me understand these technical issues and recommend current materials for learning white hat hacking.
White Hat Hacking for Beginners
White hat hacking for beginners is best started by mastering the fundamentals of network technologies, operating systems, and basic programming, then gradually moving on to specialized tools and penetration testing methods. Current resources include modern online courses, official documentation, and practical cybersecurity guides that help overcome the difficulties of studying classic books due to outdated examples and configurations.
Contents
- White Hat Hacking Basics for Beginners
- Current Literature and Resources
- Understanding CPU Registers
- Solving gdb Problems
- Practical Learning Plan
- Online Platforms and Communities
White Hat Hacking Basics for Beginners
White hat hacking (ethical hacking) is the legal practice of testing security systems to identify vulnerabilities. For beginners, it’s important to understand that this is a systematic discipline requiring fundamental knowledge in several areas:
Required basic knowledge:
- Network protocols (TCP/IP, DNS, HTTP/HTTPS)
- Operating system principles (Linux/Windows)
- Programming fundamentals (Python, C/C++)
- Understanding of processor and memory architecture
- Databases and web technologies
Important: White hat hacking requires a deep understanding of the systems you are testing. Without basic knowledge, advanced techniques will be incomprehensible and ineffective.
You should start by learning Linux, as most security testing tools are designed specifically for this operating system. Installing a Linux virtual machine (such as Kali Linux or Parrot Security OS) will allow you to practice safely in an isolated environment.
Current Literature and Resources
The classic book “Hacking: The Art of Exploitation” does contain outdated examples and configurations, which causes difficulties for modern beginners. Here are more current resources:
Modern Books:
-
“Black Hat Python: Python Programming for Hackers and Pentesters” - Justin Seitz
- Modern approach to writing security tools in Python
- Up-to-date examples for Python 3.x
- Real-world practical cases
-
“Metasploit: The Penetration Tester’s Guide” - David Kennedy et al.
- Official guide to the Metasploit Framework
- Gradual learning from basic to advanced techniques
- Current exploits and modules
-
“Web Application Hacker’s Handbook” - Dafydd Stuttard, Marcus Pinto
- Comprehensive guide to web application testing
- Modern vulnerabilities and exploitation techniques
- Practical examples on real applications
Online Resources:
- TryHackMe - interactive platform for practical learning with labs of varying difficulty levels
- Hack The Box - platform for practical skills testing in real-world conditions
- PortSwigger Web Security Academy - free web security courses from the creators of Burp Suite
- OWASP (Open Web Application Security Project) - official documentation and web security standards
Tip: Start with TryHackMe as it provides a structured learning path and hints for solving challenges.
Understanding CPU Registers
CPU registers EAX, ECX, EDX, and EBX are indeed temporary CPU variables, but their purpose is more specific:
Main x86 registers:
| Register | Purpose | Typical Uses |
|---|---|---|
| EAX | Accumulator | Arithmetic operations, function return values |
| ECX | Counter | Loops, counters in LOOP commands |
| EDX | Data Register | Additional data in operations, multiplication/division |
| EBX | Base Register | Data pointers, memory addressing |
In the context of exploits and debugging, these registers play a key role:
- EAX often contains the result of function execution or a pointer to the return address
- ECX is used in loops and when working with strings
- EDX may contain the buffer address or data size
- EBX is often used to store the address of GOT (Global Offset Table)
Example: When exploiting buffer overflow, EAX typically contains the return address that we want to modify to execute arbitrary code.
For better understanding, it’s recommended to use a debugger (gdb) to observe changes in register values during program execution.
Solving gdb Problems
The gdb error you encountered usually occurs due to a conflict in the .gdbinit file. Here’s a step-by-step solution:
Fix Steps:
-
Check the contents of
.gdbinit:bashcat ~/.gdbinit -
Delete or rename the problematic file:
bashmv ~/.gdbinit ~/.gdbinit.backup -
Restart gdb:
bashgdb -q ~/a.out
Problem Causes:
- Conflict between settings in
.gdbinitand the current version of gdb - Outdated commands or syntax in the configuration file
- Character encoding issues (especially when working with Russian characters)
Basic gdb Commands:
break main # Set breakpoint in main function
run # Run the program
info registers # Show values of all registers
x/10x $esp # Show 10 words from the stack
disassemble main # Disassemble main function
Important: After fixing the configuration, gdb should work correctly. If the problem persists, try creating a new
.gdbinitwith minimal settings.
Practical Learning Plan
A structured approach to learning white hat hacking should include the following stages:
Stage 1: Fundamental Knowledge (1-2 months)
- Mastering Linux and command line
- Python basics for security
- Network technologies and protocols
- Databases and SQL
Stage 2: Tools and Methodologies (2-3 months)
- Metasploit Framework
- Wireshark and network traffic analysis
- Nmap and port scanning
- John the Ripper and password cracking
Stage 3: Web Application Testing (3-4 months)
- OWASP Top 10 vulnerabilities
- Tools: Burp Suite, ZAP
- XSS, CSRF, SQLi, SSRF
- Authentication and sessions
Stage 4: System Testing (2-3 months)
- Exploit development
- Code obfuscation
- Bypassing protection systems
- Malware analysis
Stage 5: Advanced Techniques (ongoing)
- Reverse engineering
- Cryptanalysis
- Network intrusion detection
- Social engineering
Recommendation: Each stage should include practical assignments on corresponding platforms (TryHackMe, Hack The Box).
Online Platforms and Communities
For effective white hat hacking learning, actively use the following resources:
Practical Platforms:
-
TryHackMe
- Suitable for beginners
- Structured rooms and paths
- Hints and explanations
-
Hack The Box
- More challenging machines
- Competitive element
- Community of experienced hackers
-
CTFtime
- Information about CTF competitions
- Post-event challenge writeups
- Practice with real vulnerabilities
Communities and Forums:
- Reddit: r/netsec, r/AskNetsec
- Stack Overflow (infosec tag)
- Exploit-DB (exploit database)
- SecurityFocus
Certifications (for in-depth study):
- CompTIA Security+ - basic security knowledge
- CEH (Certified Ethical Hacker) - official certification
- OSCP (Offensive Security Certified Professional) - hands-on certification
Tip: Start with TryHackMe to master the basics, then move to Hack The Box for more challenging tasks. Participate in CTF competitions to practice real-world skills.
Sources
- TryHackMe - Interactive Cyber Security Learning Platform
- Hack The Box - Cyber Security Challenges
- OWASP - Open Web Application Security Project
- Metasploit Documentation
- PortSwigger Web Security Academy
- Linux Foundation - Training Resources
- Python for Security Documentation
Conclusion
White hat hacking is a fascinating and in-demand field that requires a systematic approach to learning. You should start by mastering fundamental knowledge in Linux, networking, and programming, then gradually move on to specialized tools and security testing methodologies. Classic literature is useful for understanding the basics, but modern online resources and practical platforms will provide up-to-date knowledge and skills. Don’t forget the importance of practical experience - regularly solving challenges on TryHackMe and Hack The Box will significantly accelerate your development in this field. Remember that ethical hacking requires not only technical skills but also a deep understanding of laws and ethical principles in information security.