Hacking Stage 2
Hacking Stage 2
home
John Sara
Document
Music
s
txt
file
LINUX BASICS:
LINUX BASICS:
/etc: holds all sort of configuration files for the system;
/etc/passwd: is a text file that contains a list of the systems'
account and information for each account such as User ID and
Group ID
System users such as :root, daemon, bin, sys….
Normal users such as: Richard, Chris, Marian…
Passwords are not in /passwd anymore, this file is insecure;
Password are in /shadow file which is only readable by root
user;
LINUX BASICS:
The /etc/passwd contains one entry per line for each user:
username:X:1001:1002:UserName:/home/username:/bin/bash
1. Username: It is used when user logs in. It should be between 1
and 32 characters in length.
2. Password: An x character indicates that encrypted password is
stored in /etc/shadow file.
3. User ID (UID): Each user must be assigned a user ID (UID).
UID 0 (zero) is reserved for root and UIDs 1-99 are reserved for
other predefined accounts. Further UID 100-999 are reserved by
system for administrative and system accounts/groups.
4. Group ID (GID): The primary group ID (stored in /etc/group
file)
LINUX BASICS:
The /etc/passwd contains one entry per line for each user:
username:X:1001:1002:UserName:/home/username:/bin/bash
5. User ID Info: The comment field. It allows you to add extra
information about the users such as user’s full name, phone
number etc. This field is used by finger command.
6. Home directory: The absolute path to the directory the user
will be in when they log in. If this directory does not exist, then
user’s directory becomes /
7. Command/shell: The absolute path of a command or shell
(/bin/bash).
LINUX BASICS:
The /etc/group file contains one line per group. Each record has 4
fields:
groupname:X:1001:username1,username2,usernam3…
1. Groupname: It is defines a user readable group name
2. Password: An x character
3. Group ID (GID): The group ID
4. Username(s): one or more usernames (From the /etc/passwd file)
that are members of the group
PASSWORD CRACKING METHODS:
Passwords are something :
Individual can easily remember;
Not being too easy to guess.
In reality people use passwords that are easy to guess.
Four password cracking methods:
Passive Online Attacks;
Active Online Attacks;
Offline Attacks;
Non-technical Attacks.
PASSWORD CRACKING METHODS:
Passive Online Attacks: sniffers
Active Online Attacks:
Dictionary and Brute-force Attacks;
• Dictionary attack: trying hundreds or sometimes millions of
likely possibilities, such as words in a dictionary until the correct
words are discovered;
• Hybrid attacks: adds letters and numbers to every word in a
dictionary;
• Inserting numbers
• Duplication: catcat
• Symbol substitution: Password becomes Pa$$w0rd
• Reversing: Mike becomes ekiM
• Appending characters such as 4u, ed, ing…
PASSWORD CRACKING METHODS:
• Brute-force attack: all possible combinations of characters from
keyboard are tried until the correct combination is discovered;