How to start Hacking. Part 1. 06-24-2014, 10:02 AM
#1
How to start hacking
A passive aggressive response to Auroras thread.
A passive aggressive response to Auroras thread.
One of the most important features of hacking is code auditing, it is the process in which one picks apart someone else's code either to admire it or to find flaws in it. In order to audit code it is often nice to setup a good work environment. This is guide is aimed at Linux and thus I will not accommodate Windows although many of the commands I describe will be present on Apple computers (as they are UNIX based).
The most important tools I use are grep & vim. What do these commands perform? Well these are the official man descriptions:
Quote:GREP(1) GREP(1)
NAME
grep, egrep, fgrep, rgrep - print lines matching a pattern
SYNOPSIS
grep [OPTIONS] PATTERN [FILE...]
grep [OPTIONS] [-e PATTERN | -f FILE] [FILE...]
DESCRIPTION
grep searches the named input FILEs (or standard input if no files are
named, or if a single hyphen-minus (-) is given as file name) for lines
containing a match to the given PATTERN. By default, grep prints the
matching lines.
Quote:VIM(1) VIM(1)
NAME
vim - Vi IMproved, a programmers text editor
SYNOPSIS
vim [options] [file ..]
vim [options] -
vim [options] -t tag
vim [options] -q [errorfile]
ex
view
gvim gview evim eview
rvim rview rgvim rgview
DESCRIPTION
Vim is a text editor that is upwards compatible to Vi. It can be used
to edit all kinds of plain text. It is especially useful for editing
programs.
(Note: You can lookup (most) commands using the man command, the syntax being man <command>, if you are new to Linux whenever you encounter an odd command man it.)
To use vim at a basic level just use the following:
1. To open something use the command `vim` with the following syntax `vim <file>`
2. There are two main modes, INSERT and COMMAND (or something like that). To actually start editing a file press I (for insert) and to return to COMMAND mode (or whatever) press esc.
3. A : follows every command, for instance use :exit to exit and save, and :q! to exit and not save anything.
To use grep simply use the following syntax:
Code:
maus@honeypot:~$ grep
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
maus@honeypot:~$You can also (ofcourse) pipe output to grep. For instance:
Code:
maus@honeypot:~$ cat /etc/passwd | grep $USER
maus:x:1000:1000:maus,,,:/home/maus:/bin/bash
maus@honeypot:~$In the next part we will download some code and audit it in an efficient manner, then Ill post some links on exploit development (no I'm not going to rewrite a really over saturated subject).




![[+]](https://sinister.li/images/modern/collapse_collapsed.png)



![[Image: inkexplosion.jpg]](http://i0.wp.com/techverse.net/wp-content/uploads/2013/09/inkexplosion.jpg)

























![[Image: F4Z9Dqw.png]](https://i.imgur.com/F4Z9Dqw.png)