Building Blocks
Building Blocks
Building Blocks
2
What is Informational Security ?
3
Need of Information Security
The terms information security, computer security and
information assurance are frequently incorrectly used
interchangeably. These fields are interrelated often and share the
common goals of protecting the confidentiality, integrity and
availability of information.
4
Importance of Information Security
5
One of the biggest potential threats to information security is the
people who operate the computers. A workplace may have
excellent information security systems in place, but security can
be easily compromised.
6
What is Hacking ?
Hacking may be defined as the “methodology adopted by ethical
hackers to discover the vulnerabilities existing in information
systems’ operating environments”.
7
The term “Hack" is to refer to a program that (often illegally)
modifies another program, usually a computer game, giving the
user access to those features which are inaccessible to them.
8
What is Cracking ?
9
Hacker
This is someone that seeks to
understand computer, phone or other
systems strictly for the satisfaction of
having that knowledge.
10
The possible characteristics that
qualify one as a hacker :
11
Cracker
Crackers get into all kinds of mischief, including breaking or
"cracking" copy protection on software programs, breaking into
systems and causing harm, changing data, or stealing.
12
Categorization of Hackers
13
Types of Hacker
BLACK HAT
Black Hat - Also known as a
cracker uses his skills to break
into computer systems for
unethical reasons.
14
WHITE HAT
White hat has the skills to break
into computer systems and do
damage. However, they use their
skills to help organizations.
15
GREY HAT
This type can be thought of as a
white hat attacker who sometimes
acts unethically. They could be
employed as a legit network security
administrator.
16
Steps of Hacking
Hacking consists of large number of steps. It is basically
classified into 5 major steps i.e. -:
1. FOOTPRINTING
2. SCANNING
3. GAINING ACCESS
4. MAINTAING ACCESS
5. CLEARING TRACKS
17
What is Foot Printing ?
18
The Necessity of Foot Printing
Footprinting is necessary to systematically
and methodically ensure that all pieces of
information related to the aforementioned
technologies are identified.
19
Types of Foot Printing
WHOIS
The WHOIS system originated as a method for
system administrators to obtain contact
information for IP address assignments or
domain name administrators. The use of the data
in the WHOIS system has evolved into a variety of
uses, including:
20
• Determining the registration status of domain
names;
21
• Contributing to user confidence in the Internet as a reliable and
efficient means of information and communication and as an
important tool for promoting digital inclusion, e-commerce and
other legitimate uses by helping users identify persons or entities
responsible for content and services online; and
22
23
NS lookup
nslookup is the name of a program that lets an Internet server
administrator or any computer user enter a host name (for
example, "whatis.com") and find out the corresponding ip
adress. It will also do reverse name lookup and find the host
name for an IP address you specify.
24
nslookup sends a domain name query packet to a designated (or
defaulted) domain name system (DNS) server.
Depending on the system you are using, the default may be the
local DNS name server at your service provider, some
intermediate name server, or the root server system for the
entire domain name system hierarchy
25
IP Lookup
The IP Address Lookup tool also referred to as IP Lookup,
Lookup IP, Lookup IP Address, IP Address Location, IP Location,
and IP Locator is designed to give you an idea of where your IP
address or the IP Address you lookup is located.
26
If you are in the US and the controlling agency of the IP is
located in Canada, chances are the IP address lookup results
will show as Canada. Showing a Canadian IP while in the
US is very common among Blackberry users on the Verizon
network.
27
28
How to gather info
Gathering info about the victim can be done from :
1. Website
2. Social Profiles
3. Contact Info
4. Fake Calling
5. Fake Mails
29
Google crawling
Google takes a snapshot of each page it
examines and caches (stores) that version as a
back-up. The cached version is what Google
uses to judge if a page is a good match for your
query.
Wildcards in Google
Use *, an asterisk character, known as a
wildcard, to match one or more words in a
phrase.
.
Each * represents just one or more words.
Google treats the * as a placeholder for a word
or more than one word.
30
Google limits queries to 32 words.
Google will indicate in a message below the query box at the top
of the page if your query exceeds the 32-word limit.
The 32-word limit applies to search terms and operators but not
stop words. (The limit was previously 10 words.)
31
Google Searching
Some of the Operators are as follows:
• allinurl: – Only the page URL address lines are searched (not
the text inside each webpage).
33
What is Scanning ?
Scanning is one of the easiest way to find out vulnerabilities
in the system.
34
Port Scanning
The act of systematically
scanning a computer's ports.
Since a port is a place where
information goes into and out
of a computer, port scanning
identifies open doors to a
computer.
35
36
Ways of Port Scanning
Finger printing
• Fingerprinting is the technique of
interpreting the responses of a system
in order to figure out what it is.
37
ACTIVE FINGERPRINTING
• These products are designed to guestimate remote
operating systems and sometimes even the patch
level that the operating system is running on.
38
PASSIVE FINGERPRINTING
• Passive fingerprinting is based on sniffer traces from the
remote system. Instead of actively querying the remote system,
all you need to do is capture packets sent from the remote
system.
39
FIREWALIKING
• Firewalking is a technique that employs traceroute -
like techniques to analyze IP packet responses to
determine gateway ACL filters and map networks.
41
• If the packet is dropped without comment, it was probably
done at the gateway.
42
FIREWALL
• It turns out that a small home network has many of the same
security issues that a large corporate network does.
• You can use a firewall to protect your home network and family
from offensive Web sites and potential hackers.
43
TRACEROUTE
• Traceroute is the program that shows you the route over the
network between two systems, listing all the intermediate
routers a connection must pass through to get to its
destination.
44
45
A traceroute marks the path of ICMP packets from the local
host (where the command is executed) to the destination host.
It is available as a command line tool on both the UNIX
(traceroute) and Windows (tracert) operating systems.
46
NETWORK ENUMERATION
Network Enumeration is the discovery of hosts/devices on a
network, they tend to use overt discovery protocols such as ICMP
and SNMP to gather information, they may also scan various
ports on remote hosts for looking for well known services in an
attempt to further identify the function of a remote host and
solicit host specific banners.
47
Gaining Access
Gaining access refers to the true attack phase.
48
Maintaining Access
● Rootkits
● Backdoors
49
Clearing Tracks
Clearing Tracks is the last and important step of remote
hacking, which includes the deletion of all logs on the remote
system. This step is used by hackers to keep their identity
anonymous.
Techniques include:
● Tunneling.
● Disabling auditing
50
How to become a Hacker
1. Learn computer programming.
Computer programming is a
fundamental, though complex, hacker
skill. Several different programming
languages should be learned such as
C, LISP, Perl and Java.
51
This will provide the very basic
skills but the only way to advance
in skill is to read code and write
code. The Internet provides a
multitude of free programming
tools and operating systems to
expedite the learning process
The difference is that the Unix operating system free and the
code is open source--it can be read and modified. Windows
and MacOS are distributed in binary code.
52
The code cannot be read or modified. The Unix operating
system must be mastered. It can be loaded on any PC. The
hacker can read the code and modify it using a wide
variety of free programming tools.
The Linux is a very popular Unix-based operating system. It
has all of the features of the original Unix OS such as open
source and popular programming tools
53
54
4. Stay connected to the hacker community. The hacker
community is run primarily by volunteers. There are many
different tasks that need to be done to keep things going such
as administering mailing lists, moderating newsgroups and
developing technical standards.
55
Penetration Test
• A penetration test, occasionally pentest,
is a method of evaluating the security of a
computer network by simulating an attack
from a malicious source, known as a Black
Hat Hacker, or Cracker.
56
• This analysis is carried out from the position of a potential
attacker and can involve active exploitation of security
vulnerabilities. Any security issues that are found will be
presented to the system owner, together with an assessment of
their impact, and often with a proposal for mitigation or a
technical solution.
57
Types Penetration Testing
BLACK BOX TESTING
It is a method of software testing that tests the functionality
of an application as opposed to its internal structures or
workings.
58
It uses external descriptions of the software, including
specifications, requirements, and design to derive test cases
59
60
WHITE BOX TESTING
White box Testing is a method of testing
software that tests internal structures or
workings of an application, as opposed to
its functionality (i.e black box testing).
61
While white-box testing can be applied at the unit, integration
and system levels of the software process , it is usually done at
the unit level.
62
GREY BOX TESTING
• Grey box Testing involves having knowledge of internal data
structures and algorithms for purposes of designing the test
cases, but testing at the user, or black-box level.
63
Need of Penetration Testing
64
• Protecting your brand by avoiding loss of consumer
confidence and business reputation.
65
Steps in Penetration Testing
1. Information Gathering
2. Network Mapping
3. Vulnerability Identification
4. Penetration
5. Gaining Access & Privilege Escalation
6. Enumerating Further
7. Compromise Remote Users/Sites
8. Maintaining Access
9. Covering Tracks
66
Pictorial Representation
67
INFORMATION
GATHERING is essentially using
the Internet to find all the information
you can about the target (company
and/or person) using both technical
(DNS/WHOIS) and non-technical
(search engines, news groups, mailing
lists etc) methods.
68
This is the initial stage of any information security audit, which
many people tend to overlook. When performing any kind of test
on an information system, information gathering and data
mining is essential and provides you with all possible
information to continue with the test.
69
NETWORK MAPPING
Network specific information from the previous section is taken
and expanded upon to produce a probable network topology for
the target.
Many tools and applications can be used in this stage to aid the
discovery of technical information about the hosts and networks
involved in the test.
70
• Find live hosts
• Service fingerprinting
71
VULNERABILITY IDENTIFICATION
During vulnerability identification, the assessor will perform
several activities to detect exploitable weak points. These
activities include:
72
Perform false positive and false negative verification (e.g. by
correlating vulnerabilities with each other and with previously
acquired information)
73
PENETRATION
The assessor tries to gain unauthorized access by circumventing
the security measures in place and tries to reach as wide a level
of access as possible.
74
GAINING ACCESS AND PRIVILEGE
ESCALATION
It allows the assessors to confirm and document
probable intrusion and/or automated attacks
propagation
GAINING ACCESS
• Discovery of username/password combinations)
75
ENUMERATING FURTHER
• Obtain encrypted passwords for offline cracking
76
COMPROMISE REMOTE USERS/SITES
A single hole is sufficient to expose an entire network, regardless
of how secure the perimeter network may be. Any system is as
strong (in this case, as secure) as the weakest of its parts.
77
MAINTAINING ACCESS
COVERT CHANNELS
78
BACKDOORS
Backdoors are meant to be able to always get back to a certain
system, even if the account you used to hack the system is no
longer available (for example, it has been terminated).
ROOT-KITS
Root-kits will allow you to have even more power than the
system administrator does of a system. You will be able to
control the remote system completely
79
COVER THE TRACKS
HIDE FILES
The importance of this stage is easily understood but usually
understated. After an attacker has successfully compromised
a system, he will like to keep it without alerting the
administrator, for obvious reasons. The longer the attacker
stays on a compromised system, the better the chances that
he will be able to achieve his goals further in the network.
80
CLEAR LOGS
Hiding files is important if the security assessor needs to hide
activities which have been done so far while and after
compromising the system and to maintain back channel[s].
This is also important to hide tools so
that these don’t need to be uploaded to
the target server each time.
METHODOLOGY
1. Check History
81
DEFEAT ANTI-VIRUS
The focus of this step in penetration testing is to be able to
disable or defeat AV software so that the assessor is able to
perform activities unhindered, and the possibility to reactivate
the AV later.
Possible things that assessors can do (most require
Administrator level access):
82
IMPLEMENT ROOT-KITS
• Root-kits, like POC exploits, should be customized to be able to
completely cover the assessor’s activities. In most cases if there
is an AV patrolling, root-kits (usually on win32) will be detected
before installation. So, modifying the root-kits is required in
most situations.
83
84