Hi reader,
No...I will call you my friend.
Before we go on with the serious stuff I would like to point out that :
* If you are here looking for a magical code that will hack your girl friend's Instagram account or
* If you are on a lookout for a script that will hack stuffs for you.
Then you are on the wrong blog my friend.
(You can skip my short booooring story down here)
Honestly speaking I also started as a script kiddie and I felt so powerful after hacking my crush's Instagram account with a phishing script that I got from a git hub page.
Few years back I was on YouTube searching "How to hack" and that's how I started.
My honest piece of advice is just don't quit and keep learning new things on the topic (Knowledge is almost free nowadays). Hacking is my passion but there are times when I am even bored and lazy to follow my passion (especially when the topic gets tough) but I never stopped.
And its quite funny that I thought it was IMPOSSIBLE for me to learn when I was reading about stack and buffer overflow as I had no teacher or mentor.
Ok ok... I know you are quite bored reading my silly story.
Lets get started with the real technical stuffs.
Some Prerequisites:
1. You must have a basic knowledge of C programming language.(if you don't already....Wth are you doing till now?? Programming are a must if you want to step into serious hacking).
2. That's it . There is no other requirement.
Assuming you know C language already,
Let's write a simple C program now and try to see it from a hacker's perspective.
#include <stdio.h>
void myfunc(int x , int y)
{}
void main()
{
myfunc(1, 2);
}
The above program doesn't do anything useful. It just call our function "myfunc" which does nothing.
Most programmer are only concern about the C source code but we as a hacker we need to concern more on how things work instead of just using things for granted.
What do you do with your C source code?
A computer only understands binary code (i,e 0s and 1s). That means our computer doesn't understand our C code. And that's why we need to first compile our C code and then run the executable produced by our compiler.
Have you ever wondered what's inside an executable file (like exe or elf)?
Yes, it is in binary code which our computer understands. OK I know it's not a piece of cake to understand binary code by a human. That's why there exists a language(known as assembly language) which lies between our C code and our executable Binary file.
Assembly language is a language which is very close to our computer understandable Binary code.
Above is our main function in assembly and hex format.
The "push %ebp", "mov %esp, %ebp" instructions above are the assembly representation of our binary executable and the "55" and "89 e5" are the binary version of our assembly code(actually it's in Hexadecimal format which corresponds to the binary code which our machine understands).
Chill Dude......It's totally alright if you don't understand the above assembly and stuffs. I will clear all your doubts very soon but now I am very lazy to write.
Lets continue next time (ohhh I wont let you wait for a year for the next post :)
Note and Takeaways :
* Assembly code differ with different in architecture of the CPU(like x86 and x64).
Architecture?? Search the web for CPU architecture.But you don't need to learn deep into architecture for now. Just scratch it.
* Computer doesn't execute our C source. That means there is a lot to know other then the C source (Understanding the internal workings).
* I will teach you assembly code very soon :)
* In case if you wonder Where are we heading with all this assembly and stuffs?
We are going to hack into our first executable like chrome.exe (wait......we are not hacking into chrome.exe it's not a piece of cake to do so). In some cases (most of the case) hacking an executable gives you access to the whole target computer.
Excuse me if I made any mistake above.
OK...bye for now I need to reward myself for finally taking the time to write and talk to you.