Now Reading
C/C++ Programming for Hackers: Part 1 (Introduction)3 min read
The short URL of the present article is: https://4hax.net/RKx8F

Hello my fellow hackers! Since i am new here, i’d first like to introduce myself: i am Phoenix750, a young passionated hacker who likes to share everything he knows with other people of my kind. I have been reading null byte for quite some time now, but only could register today. I truely love how this community respects newcomers, But even after reading a lot of tutorials on here, i never came accross a good programming tutorial (except the scripting tutorials, but scripting isn’t programming. I’ll talk about that later). There are forum questions about it, but not really a decent series of tutorials. So i decided to write them to help the newcomers! So, with my introduction out of the way, let’s get started!

What You Will Need Before We Begin

  1. A Linux operating system. i am going to use Ubuntu in these series. you can use any other Linux distro or even Windows if you know how to setup the GNU/GCC compiler for that operating system. but i still recommend Ubuntu because GCC comes preinstalled on it. I will only talk about the install instructions for Ubuntu (thoughh they should be the same for Kali aswell).
  1. The GNU/GCC compiler. this is the compiler that we will use to build our programs. if you do not know what a compiler is, a compiler is simply said a program that turns our programming code (C, C++, Java…) into machine code (1’s and 0’s). to Check if you have GCC installed, just type the following in a terminal:

gcc –help

this should produce an output like this:

If you have a “command not found” error, then you must type this in your terminal, and it should begin installing.

apt-get update && apt-get install gcc -y

  1. A text editor. this can be any text editor, but i will use the default one in Ubuntu.

Why Programming Is Important for Hackers to Know.

Programming is an important skill that every self respecting hacker should master. here are some good examples of why it is important:

  • Building your own malware. When you program your own malware, there is no signature for it registered, thus making it pretty much impossible for AV software to detect.
  • Knowing how programs work will help you exploit them. though most exploit development is done in the assembly language in debuggers, knowing how a program works will help you exploit it faster.
  • Hacking tools are mostly open source. most hacking tools are open source, which means everyone can access the source code of said program. when you know how to program in the language the program is written, you can edit it and make it even better!
  • Making your own exploits. Though i recommend ruby & the Metasploit Framework for this purpose, ruby is still quite slow compared to C or C++. if you need your exploit to be fast, you can write it in C/C++.

i chose to make a series about C/C++ because C++ is a powerful language and is used in a lot of programs, like games. C is less powerfull but is still quite a low-level language, which means it interacts closely with the CPU. embedded devices are usually programmed in C aswell, from traffic lights to your microwave, will most likely run on some kind of software that is written in C.

What Will We Be Doing in This Series?

first of all, we must master the basics of C/C++. once that is done, we can do some more exciting stuff. here is what i have planned:

  • Make a virus.
  • reprogram some hacking tools written in C/C++.
  • write some other cool software.

that is it for now, folks! in the next tutorial, we will finally go coding and build our first program in C!


The short URL of the present article is: https://4hax.net/RKx8F
What's your reaction?
About The Author

Leave a Response