SlideShare a Scribd company logo
1 of 55
Download to read offline
Class: BE Sem: VII
Course Name:
Advanced System Security and Digital Forensics
Laboratory
Course Code: DCSL703
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
EXPERIMENT 1
Title: Static code analysis using open source tools like RATS, Flawfinder etc.
Description:
Roy Ben Yosef reports that the simplest way to run Flawfinder under windows is
using Python directly. Install Python 2 (version 2.7). and run the flawfinder script
(on the command line).
C:Python27Python.exe flawfinder –H --savehitlist=ReportFolderhitReport.hit
C:MySourcesFolder
In the above example you can inspect the results (hit file and html report) in the
ReportFolder.
Flawfinder is not a sophisticated tool. It is an intentionally simple tool, but people
have found it useful. Flawfinder works by using a built-in database of C/C++
functions with well-known problems, such as buffer overflow risks (e.g., strcpy(),
strcat(), gets(), sprintf(), and the scanf() family), format string problems
([v][f]printf(), [v]snprintf(), and syslog()), race conditions (such as access(),
chown(), chgrp(), chmod(), tmpfile(), tmpnam(), tempnam(), and mktemp()),
potential shell metacharacter dangers (most of the exec() family, system(),
popen()), and poor random number acquisition (such as random()). The good thing
is that you don‘t have to create this database - it comes with the tool. Flawfinder
then takes the source code text, and matches the source code text against those
names, while ignoring text inside comments and strings (except for flawfinder
directives). Flawfinder also knows about gettext (a common library for
internationalized programs), and will treat constant strings passed through gettext
as though they were constant strings; this reduces the number of false hits in
internationalized programs.
Flawfinder produces a list of ―hits‖ (potential security flaws), sorted by risk; by
default the riskiest hits are shown first. This risk level depends not only on the
function, but on the values of the parameters of the function. For example, constant
strings are often less risky than fully variable strings in many contexts. In some
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
cases, flawfinder may be able to determine that the construct isn‘t risky at all,
reducing false positives.
Sample Output:
Flawfinder version 2.0.4, (C) 2001-2017 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 219
Examining test.c
Examining test2.c
FINAL RESULTS:
test.c:32: [5] (buffer) gets:
Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
test.c:56: [5] (buffer) strncat:
Easily used incorrectly (e.g., incorrectly computing the correct maximum
size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
or automatically resizing strings. Risk is high; the length parameter
appears to be a constant, instead of computing the number of characters
left.
test.c:57: [5] (buffer) _tcsncat:
Easily used incorrectly (e.g., incorrectly computing the correct maximum
size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, or
automatically resizing strings. Risk is high; the length parameter appears
to be a constant, instead of computing the number of characters left.
test.c:60: [5] (buffer) MultiByteToWideChar:
Requires maximum length in CHARACTERS, not bytes (CWE-120). Risk is high,
it appears that the size is given as bytes, but the function requires size
as characters.
test.c:62: [5] (buffer) MultiByteToWideChar:
Requires maximum length in CHARACTERS, not bytes (CWE-120). Risk is high,
it appears that the size is given as bytes, but the function requires size
as characters.
test.c:73: [5] (misc) SetSecurityDescriptorDacl:
Never create NULL ACLs; an attacker can set it to Everyone (Deny All
Access), which would even forbid administrator access (CWE-732).
test.c:73: [5] (misc) SetSecurityDescriptorDacl:
Never create NULL ACLs; an attacker can set it to Everyone (Deny All
Access), which would even forbid administrator access (CWE-732).
test.c:17: [4] (buffer) strcpy:
Does not check for buffer overflows when copying to destination [MS-banned]
(CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
easily misused).
test.c:20: [4] (buffer) sprintf:
Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
vsnprintf.
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
test.c:21: [4] (buffer) sprintf:
Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
vsnprintf.
test.c:22: [4] (format) sprintf:
Potential format string problem (CWE-134). Make format string constant.
test.c:23: [4] (format) printf:
If format strings can be influenced by an attacker, they can be exploited
(CWE-134). Use a constant for the format specification.
test.c:25: [4] (buffer) scanf:
The scanf() family's %s operation, without a limit specification, permits
buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
different input function.
test.c:27: [4] (buffer) scanf:
The scanf() family's %s operation, without a limit specification, permits
buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
different input function.
test.c:38: [4] (format) syslog:
If syslog's format strings can be influenced by an attacker, they can be
exploited (CWE-134). Use a constant format string for syslog.
test.c:49: [4] (buffer) _mbscpy:
Does not check for buffer overflows when copying to destination [MS-banned]
(CWE-120). Consider using a function version that stops copying at the end
of the buffer.
test.c:52: [4] (buffer) lstrcat:
Does not check for buffer overflows when concatenating to destination
[MS-banned] (CWE-120).
test.c:75: [3] (shell) CreateProcess:
This causes a new process to execute and is difficult to use safely
(CWE-78). Specify the application path in the first argument, NOT as part
of the second, or embedded spaces could allow an attacker to force a
different program to run.
test.c:75: [3] (shell) CreateProcess:
This causes a new process to execute and is difficult to use safely
(CWE-78). Specify the application path in the first argument, NOT as part
of the second, or embedded spaces could allow an attacker to force a
different program to run.
test.c:91: [3] (buffer) getopt_long:
Some older implementations do not protect against internal buffer overflows
(CWE-120, CWE-20). Check implementation on installation, or limit the size
of all string inputs.
test.c:16: [2] (buffer) strcpy:
Does not check for buffer overflows when copying to destination [MS-banned]
(CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
easily misused). Risk is low because the source is a constant string.
ANALYSIS SUMMARY:
Hits = 36
Lines analyzed = 118
Physical Source Lines of Code (SLOC) = 80
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Hits@level = [0] 0 [1] 9 [2] 7 [3] 3 [4] 10 [5] 7
Hits@level+ = [0+] 36 [1+] 36 [2+] 27 [3+] 20 [4+] 17 [5+] 7
Hits/KSLOC@level+ = [0+] 450 [1+] 450 [2+] 337.5 [3+] 250 [4+] 212.5 [5+]
87.5
Suppressed hits = 2 (use –never ignore to show them)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(http://www.dwheeler.com/secure-programs) for more information.
Testing for no ending newline:
Lines analyzed = 32
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
EXPERIMENT 2
Title : Vulnerability scanning using Nessus, Nikto (Kali Linux).
Description :
Nessus
Nessus is public domain software released under the GPL. Nessus is designed to
automate the testing and discovery of known security problems. Allowing system
administrators to correct problems before they are exploited. Historically, many in
the corporate world have frowned on such public domain software, instead
choosing "supported" products developed by established companies. Usually these
packages cost thousands of dollars and the license is based upon the number of IP
addresses scanned. However, many in the corporate world are now starting to
realize that public domain software, such as Nessus, NMap, Apache, and MySQL,
is often superior to similar commercial products.
This assessment involves three distinct phases.
Scanning
In this phase, Nessus probes a range of addresses on a network to determine which
hosts are alive. One type of probing sends ICMP echo requests to find active hosts,
but does not discount hosts that do not respond - they might be behind a firewall.
Port-scanning can determine which hosts are alive and what ports they have open.
This creates a target set of hosts for use in the next step.
Enumeration
In this phase, Nessus probes network services on each host to obtain banners that
contain software and OS version information. Depending on what is being
enumerated, username and password brute-forcing can also take place here.
Vulnerability Detection
Nessus probes remote services according to a list of known vulnerabilities such as
input validation, buffer-overflows, improper configuration, and many more.
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Nessus is a proprietary comprehens, vulnerability scanner which is developed by
Tenable Network Security. It is free of charge for personal use in a non-enterprise
environment.
Installation Steps:
1. Download Nessus setup file
- Go to www.tenable.com -> products -> Nessus-> download
- Download Nessus for ubuntu14.4
2. Install Nessus
· Open a Terminal and go to the download directory (cd)
· Run sudo dpkg -i Nessus*.deb. Enter root password.
· Start it sudo /etc/init.d/nessusd start
3. After installation, go to https://localhost:8834
- Click on Get started for registration
- Initial account setup: provide login details
- Plug-in feed registration
a) Go to http://www.nessus.org/register/ for registration and activation code.
Register by entering user details and valid mail id. Activation code will be
sent to given mail id.
b) Activate using supplied activation code
c) Click on download plug-in
d) It will show following fetching plug-ins window
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
- Sign in for Nessus vulnerability scanner using login name and password
4. Create scan by clicking scan-> add scan -> provide scan details(scan name, type of scan,
target addr etc)
5. Check vulnerability report in Results
Ref : https://docs.tenable.com/other/nessus/nessus_6.4_user_guide.pdf
Basic Network scanning
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Advanced Scanning in General Search
Ntstat port scanning
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Vulnerability Mapping
Policies
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Plugins
General Scanning
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Port scanning
Creating a new Scan as a Template
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
EXPERIMENT 3
Title : To explore the website copier HTTrack
Description :
HTTrack is a free (GPL, libre/free software) and easy-to-use offline browser
utility. It allows you to download a World Wide Web site from the Internet to a
local directory, building recursively all directories, getting HTML, images, and
other files from the server to your computer. HTTrack arranges the original site's
relative link-structure. Simply open a page of the "mirrored" website in your
browser, and you can browse the site from link to link, as if you were viewing it
online. HTTrack can also update an existing mirrored site, and resume interrupted
downloads. HTTrack is fully configurable, and has an integrated help system.
WinHTTrack is the Windows (from Windows 2000 to Windows 10 and above)
release of HTTrack, and WebHTTrack the Linux/Unix/BSD release.
Download from
https://www.httrack.com/page/2/en/index.html
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
EXPERIMENT 4
Title : Exploring Router and VLAN security, setting up access lists using Cisco
Packet tracer(student edition)
Description : To explore router security, the routers can be configured by
setting passwords and user authentication.
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#enable password cisco
R1(config)#enable secret student
R1(config)#service password-encryption
R1(config)#username mita privilege 15 password 0 cisco
Setting up VLANs
1. Configure two VLANs on each switch, VLAN 10 and VLAN 20.
S1(config)#vlan 10
S1(config-vlan)#vlan 20
S2(config)#vlan 10
S2(config-vlan)#vlan 20
S3(config)#vlan 10
S3(config-vlan)#vlan 20
2. Use the show vlan and show vlan brief command to verify your VLANs.
Notice that all interfaces are in VLAN 1 by default
S1#sh vlan
S1#sh vlan brief
3. Configuring VLAN Interfaces
S1(config)#interface vlan 10
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
S1(config-if)#ip address 10.10.10.1 255.255.255.0
S1(config-if)#interface vlan 20
S1(config-if)#ip address 20.20.20.1 255.255.255.0
Configuring and Verifying Trunk Links
S1#config t
S1(config)#interface fa0/15
S1 (config-if)#switchport trunk encapsulation dot1q
S1 (config-if)#switchport mode trunk
S1 (config-if)#interface fa0/16
S1 (config-if)#switchport trunk encapsulation dot1q
S1 (config-if)#switchport mode trunk
S1 (config-if)#interface fa0/17
S1 (config-if)#switchport trunk encapsulation dot1q
S1 (config-if)#switchport mode trunk
S1 (config-f)#interface fa0/18
S1 (config-if)#switchport trunk encapsulation dot1q
S1 (config-if)#switchport mode trunk
Setting up Access control lists using Cisco packet tracer
● Access control lists (ACLs) can be used for two purposes on Cisco devices:
to filter traffic, and to identify traffic.
● Access lists are a set of rules, organized in a rule table. Each rule or line in
an access-list provides a condition, either permit or deny:
Router(config)#access-list 10 deny 172.16.10.0 0.0.0.255
● This tells the router to match the first three octets exactly but that the fourth
octet can be anything:
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Assume there is a webserver on the 172.16.x.x network with an IP address of
172.16.10.10. In order to block network 172.18.0.0 from accessing anything on the
172.16.0.0 network, EXCEPT for the HTTP port on the web server, we would
create the following access-list on Router B:
Router(config)# access-list 101 permit tcp 172.18.0.0 0.0.255.255 host
172.16.10.10 eq 80
Router(config)# access-list 101 deny ip 172.18.0.0 0.0.255.255 172.16.0.0
0.0.255.255
Router(config)# access-list 101 permit ip any any
The first line allows the 172.18.x.x network access only to port 80 on the web
server.
The second line blocks 172.18.x.x from accessing anything else on the 172.16.x.x
network.
The third line allows 172.18.x.x access to anything else.
To apply this access list, we would configure the following on Router B:
Router(config)# int e0
Router(config-if)# ip access-group 101 in
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
EXPERIMENT 5
Title: Detect SQL injection vulnerabilities in a website database using SQLMap
Description:
SQL injection (SQLi) refers to an injection attack wherein an attacker can execute
malicious SQL statements (also commonly referred to as a malicious payload) that
control a web application‘s database server (also commonly referred to as a
Relational Database Management System – RDBMS). Since an SQL injection
vulnerability could possibly affect any website or web application that makes use
of an SQL-based database, the vulnerability is one of the oldest, most prevalent
and most dangerous of web application vulnerabilities.
By leveraging SQL injection vulnerability, given the right circumstances, an
attacker can use it to bypass a web application‘s authentication and authorization
mechanisms and retrieve the contents of an entire database. SQL injection can also
be used to add, modify and delete records in a database, affecting data integrity.
To such an extent, SQL injection can provide an attacker with unauthorized access
to sensitive data including, customer data, personally identifiable information (PII),
trade secrets, intellectual property and other sensitive information.
SQLMAP: sqlmap is an open source penetration testing tool that automates the
process of detecting and exploiting SQL injection flaws and taking over of
database servers. It comes with a powerful detection engine, many niche features
for the ultimate penetration tester and a broad range of switches lasting from
database fingerprinting, over data fetching from the database, to accessing the
underlying file system and executing commands on the operating system via out-
of-band connections.
Step 1: Installation of sqlmap
$ sudo apt-get install sqlmap
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Step 2 : List information about the existing databases
To check access to a database, - - dbs option can be used. - - dbs lists all the available
databases.
It notifies vulnerability in parameter cat, various payloads executed, name of backend
database, its
version and list of all available databases. Here, two databases: acuart and
information_schema are listed.
$ sqlmap -u http://testphp.vulnweb.com/listproducts.php?cat=1 --dbs
Step 3: Listing tables present in Database
Each of the database can further explored to get tables information from them. Option -D
can be used to specify the name of the database we need to explore. If access to the
database is allowed, we can access the tables using --tables option along with name of
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
database. Here, acuart database is accessed and all available tables in that database are
listed as an output of the following command.
$ sqlmap -u http://testphp.vulnweb.com/listproducts.php?cat=1 -D acuart --tables
Step 4: List column information of a particular table
Columns of a particular table can be viewed by specifying -T option before table name
and --columns option to query the column names. Access to table and its column for table
"products" is displayed by following command.
$ sqlmap -u http://testphp.vulnweb.com/listproducts.php?cat=1 -D acuart -T
products –columns
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Step 5: Dump the data from the columns
Information from specific column can be retrieved and displayed using -C. Multiple
column can also be listed separated by a comma and the –dump query retrieves the data.
Flowing command shows all Domain values of column name from product table from
acuart database.
$ sqlmap -u http://testphp.vulnweb.com/listproducts.php?cat=1 -D acuart -T products -C
name -- dump
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
EXPERIMENT 6
Title : Analysis of forensic images using open source tools like Autopsy: SIFT,
and commercial tool FTK Imager.
Description :
FTK imager is a forensic duplication tool available for Windows platform.
Download from link:- http://accessdata.com/product-download/digital-
forensics/ftk-imager-lite-version-3.1.1
•Steps:
–Run FTK Imager.exe to start the tool.
–From the File menu, select Create a Disk Image .
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
3. Select source
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
4. Select Drive
5. Click Add... to add the image destination.
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
6. Select Image Type
7. Fill evidence information
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
8. Select image destination folder
9. Check verify images after they are created
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Using Autopsy for analysis:
It is an inbuilt tool in Kali Linux for analyzing the forensic image.
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
New Case Information
Select Image
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Analyzing emails
Report Generation
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
EXPERIMENT 7
Title : Analysis of forensic images using open source tools like Autopsy: SIFT,
and commercial tool FTK Imager.
Description :
FTK imager is a forensic duplication tool available for Windows platform.
Download from link:- http://accessdata.com/product-download/digital-
forensics/ftk-imager-lite-version-3.1.1
•Steps:
–Run FTK Imager.exe to start the tool.
–From the File menu, select Create a Disk Image .
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
3. Select source
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
4. Select Drive
5. Click Add... to add the image destination.
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
6. Select Image Type
7. Fill evidence information
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
8. Select image destination folder
9. Check verify images after they are created
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Using Autopsy for analysis:
It is an inbuilt tool in Kali Linux for analyzing the forensic image.
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
New Case Information
Select Image
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Analyzing emails
Report Generation
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
EXPERIMENT 8
Title : Use of steganographic tools like OpenStego, to detect data hiding or
unauthorized file copying
Description :
OpenStego, the free steganography solution. OpenStego provides two main
functionalities:
● Data Hiding: It can hide any data within a cover file (e.g. images).
● Watermarking (beta): Watermarking files (e.g. images) with an invisible signature. It
can be used to detect unauthorized file copying.
Using OpenStego
Using OpenStego is pretty straightforward. There are two modes of operation -
data hiding and watermarking.
Data Hiding
In this mode, you can either hide the data (file) inside an image or extract the data
from the image. Check screenshots below to see how it can be done:
Hide data
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Extract data
Watermarking (beta)
In this mode, you can watermark / verify images with your signature. First you
need to generate signature file, and then it can be used to watermark images or
verify the same later. Check screenshots below to see how it can be done:
Generate signature
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Embed watermark
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Verify watermark
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
EXPERIMENT 9
Title : Use Password cracking using tools like John the Ripper/Cain and Abel/
Ophcrack to detect weak passwords.
Description:
According to the official website, Cain & Abel is a password recovery tool for
Microsoft Operating Systems. It allows easy recovery of various kinds of
passwords by sniffing the network, cracking encrypted passwords using
Dictionary, Brute-Force and Cryptanalysis attacks, recording VoIP conversations,
decoding scrambled passwords, recovering wireless network keys, revealing
password boxes, uncovering cached passwords and analyzing routing protocols.
The latest version is faster and contains a lot of new features like APR (ARP
Poison Routing) which enables sniffing on switched LANs and Man-in-the-Middle
attacks. The sniffer in this version can also analyze encrypted protocols such as
SSH-1 and HTTPS and contains filters to capture credentials from a wide range of
authentication mechanisms. The new version also ships routing protocols
authentication monitors and routes extractors, dictionary and brute-force crackers
for all common hashing algorithms and for several specific authentications,
password/hash calculators, cryptanalysis attacks, password decoders and some not
so common utilities related to network and system security.Cain & Abel is a tool
that will be quite useful for network administrators, teachers, professional
penetration testers, security consultants/professionals, forensic staff and security
software vendors.
First we need to download Cain & Abel, so go to the download page
www.oxid.it/cain.html.
After downloading it,just run the Self-Installing executable package and follow the
installation instructions.
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
Usage
Now after launching the application, we have to configure it to use appropriate
network card.If you have multiple network cards, it‘s better to know the MAC
address of the network card that you will use for the sniffer.To get the MAC
address of your network interface card, do the following:
1- Open CMD prompt.
/p>
2- Write the following command ―ipconfig /all‖.
3- Determine the MAC address of the desired Ethernet adapters, write it on
Notepad, and then use this information to help determine which NIC to select in
the Cain application.
Now click Configure on the main menu. It will open the configuration dialog box
where you can select the desired network interface card.
Now let‘s go through the configuration dialog tabs and take a brief look at most of
them:
Sniffer Tab:
This tab allows us to specify which Ethernet interface card we will use for sniffing.
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
ARP Tab:
This tab allows us to configure ARP poison routing to perform ARP poisoning
attack, which tricks the victim‘s computer by impersonating other devices to get
all traffic that belongs to that device, which is usually the router or an important
server.
Filters and Ports Tab:
This tab has the most standard services with their default port running on.You can
change the port by right-clicking on the service whose port you want to change
and then enabling or disabling it.
Cain‘s sniffer filters and application protocol TCP/UDP port.
HTTP Fields Tab:
There are some features of Cain that parse information from web pages viewed by
the victim such as LSA Secrets dumper, HTTP Sniffer and ARP-HTTPS,so the
more fields you add to the username and passwords fields, the more you capture
HTTP usernames and passwords from HTTP and HTTPS requests. Here is an
example: The following cookie uses the fields ―logonusername=‖ and
―userpassword=‖ for authentication purposes. If you don‘t include these two fields
in the list, the sniffer will not extract relative credentials.
GET /mail/Login?domain=xxxxxx.xx&style=default&plain=0 HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */*
Referer: http://xxx.xxxxxxx.xx/xxxxx/xxxx
Accept-Language: it
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.3); .NET CLR 1.1.4322)
Host: xxx.xxxxxx.xx
Connection: Keep-Alive
Cookie: ss=1; logonusername=user@xxxxxx.xx; ss=1; srclng=it; srcdmn=it; srctrg=_blank; srcbld=y;
srcauto=on; srcclp=on; srcsct=web; userpassword=password; video=c1; TEMPLATE=default;
Traceroute Tab:
Traceroute is a technique to determine the path between two points by simply
counting how many hops the packet will take from the source machine to reach the
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
destination machine. Cain also adds more functionality that allows hostname
resolution, Net mask resolution, and Whois information gathering.
Certificate Spoofing Tab:
This tab will allow Certificate spoofing. From Wikipedia: ―In cryptography, a
public key certificate (also known as a digital certificate or identity certificate) is
an electronic document that uses a digital signature to bind a public key with an
identity — information such as the name of a person or an organization, their
address, and so forth. The certificate can be used to verify that a public key belongs
to an individual. In a typical public key infrastructure (PKI) scheme, the signature
will be of a certificate authority (CA). In a web of trust scheme, the signature is of
either the user (a self-signed certificate) or other users (―endorsements‖). In either
case, the signatures on a certificate are attestations by the certificate signer that the
identity information and the public key belong together.‖
We can simply think of it as some sort of data (cipher suites & Public key and
some other information about the owner of the certificate) that has information
about the destination server and is encrypted by trusted companies (CA) that are
authorized for creating these types of data.The server sends its own certificate to
the client application to make sure it‘s talking to the right server.
Certificate Collector Tab:
This tab will collect all certificates back and forth between servers and clients by
setting proxy IPs and ports that listen to it.
Challenge Spoofing Tab:
Here you can set the custom challenge value to rewrite into NTLM authentications
packets. This feature can be enabled quickly from Cain‘s toolbar and must be used
with APR. A fixed challenge enables cracking of NTLM hashes captured on the
network by means of Rainbow Tables.
Password Cracking
Now it‘s time to speak about the cracker tab, the most important feature of Cain.
When Cain captures some LM and NTLM hashes or any kind of passwords for any
supported protocols, Cain sends them automatically to the Cracker tab. We will
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
import a local SAM file just for demonstration purposes to illustrate this point.
Here is how to import the SAM file:
Here are the 4 NTLM and LM hashes which will appear like the following image:
And here you will find all possible password techniques in the following image:
Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
As you can see from the previous image, there are various types of techniques that
are very effective in password cracking.
------X-------X------

More Related Content

What's hot

Crash dump analysis - experience sharing
Crash dump analysis - experience sharingCrash dump analysis - experience sharing
Crash dump analysis - experience sharingJames Hsieh
 
Penetration Testing and Intrusion Detection System
Penetration Testing and Intrusion Detection SystemPenetration Testing and Intrusion Detection System
Penetration Testing and Intrusion Detection SystemBikrant Gautam
 
Awesome_fuzzing_for _pentester_red-pill_2017
Awesome_fuzzing_for _pentester_red-pill_2017Awesome_fuzzing_for _pentester_red-pill_2017
Awesome_fuzzing_for _pentester_red-pill_2017Manich Koomsusi
 
For the Greater Good: Leveraging VMware's RPC Interface for fun and profit by...
For the Greater Good: Leveraging VMware's RPC Interface for fun and profit by...For the Greater Good: Leveraging VMware's RPC Interface for fun and profit by...
For the Greater Good: Leveraging VMware's RPC Interface for fun and profit by...CODE BLUE
 
Defcon 27 - Writing custom backdoor payloads with C#
Defcon 27 - Writing custom backdoor payloads with C#Defcon 27 - Writing custom backdoor payloads with C#
Defcon 27 - Writing custom backdoor payloads with C#Mauricio Velazco
 
44CON London - Attacking VxWorks: from Stone Age to Interstellar
44CON London - Attacking VxWorks: from Stone Age to Interstellar44CON London - Attacking VxWorks: from Stone Age to Interstellar
44CON London - Attacking VxWorks: from Stone Age to Interstellar44CON
 
A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...
A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...
A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...CODE BLUE
 
Offensive cyber security: Smashing the stack with Python
Offensive cyber security: Smashing the stack with PythonOffensive cyber security: Smashing the stack with Python
Offensive cyber security: Smashing the stack with PythonMalachi Jones
 
Metasploit - The Exploit Learning Tree
Metasploit - The Exploit Learning TreeMetasploit - The Exploit Learning Tree
Metasploit - The Exploit Learning TreeE Hacking
 
An Introduction of SQL Injection, Buffer Overflow & Wireless Attack
An Introduction of SQL Injection, Buffer Overflow & Wireless AttackAn Introduction of SQL Injection, Buffer Overflow & Wireless Attack
An Introduction of SQL Injection, Buffer Overflow & Wireless AttackTechSecIT
 
Buffer overflow – Smashing The Stack
Buffer overflow – Smashing The StackBuffer overflow – Smashing The Stack
Buffer overflow – Smashing The StackTomer Zait
 
Indicators of compromise: From malware analysis to eradication
Indicators of compromise: From malware analysis to eradicationIndicators of compromise: From malware analysis to eradication
Indicators of compromise: From malware analysis to eradicationMichael Boman
 
Defcon 22-colby-moore-patrick-wardle-synack-drop cam
Defcon 22-colby-moore-patrick-wardle-synack-drop camDefcon 22-colby-moore-patrick-wardle-synack-drop cam
Defcon 22-colby-moore-patrick-wardle-synack-drop camPriyanka Aash
 
Captain Hook: Pirating AVs to Bypass Exploit Mitigations
Captain Hook: Pirating AVs to Bypass Exploit MitigationsCaptain Hook: Pirating AVs to Bypass Exploit Mitigations
Captain Hook: Pirating AVs to Bypass Exploit MitigationsenSilo
 
Anatomy of a Buffer Overflow Attack
Anatomy of a Buffer Overflow AttackAnatomy of a Buffer Overflow Attack
Anatomy of a Buffer Overflow AttackRob Gillen
 
DEFCON 21: EDS: Exploitation Detection System WP
DEFCON 21: EDS: Exploitation Detection System WPDEFCON 21: EDS: Exploitation Detection System WP
DEFCON 21: EDS: Exploitation Detection System WPAmr Thabet
 
SELinux Kernel Internals and Architecture - FOSS.IN/2005
SELinux Kernel Internals and Architecture - FOSS.IN/2005SELinux Kernel Internals and Architecture - FOSS.IN/2005
SELinux Kernel Internals and Architecture - FOSS.IN/2005James Morris
 
Mitigating overflows using defense in-depth. What can your compiler do for you?
Mitigating overflows using defense in-depth. What can your compiler do for you?Mitigating overflows using defense in-depth. What can your compiler do for you?
Mitigating overflows using defense in-depth. What can your compiler do for you?Javier Tallón
 

What's hot (20)

Crash dump analysis - experience sharing
Crash dump analysis - experience sharingCrash dump analysis - experience sharing
Crash dump analysis - experience sharing
 
Penetration Testing and Intrusion Detection System
Penetration Testing and Intrusion Detection SystemPenetration Testing and Intrusion Detection System
Penetration Testing and Intrusion Detection System
 
Code Injection in Windows
Code Injection in WindowsCode Injection in Windows
Code Injection in Windows
 
Awesome_fuzzing_for _pentester_red-pill_2017
Awesome_fuzzing_for _pentester_red-pill_2017Awesome_fuzzing_for _pentester_red-pill_2017
Awesome_fuzzing_for _pentester_red-pill_2017
 
For the Greater Good: Leveraging VMware's RPC Interface for fun and profit by...
For the Greater Good: Leveraging VMware's RPC Interface for fun and profit by...For the Greater Good: Leveraging VMware's RPC Interface for fun and profit by...
For the Greater Good: Leveraging VMware's RPC Interface for fun and profit by...
 
Defcon 27 - Writing custom backdoor payloads with C#
Defcon 27 - Writing custom backdoor payloads with C#Defcon 27 - Writing custom backdoor payloads with C#
Defcon 27 - Writing custom backdoor payloads with C#
 
44CON London - Attacking VxWorks: from Stone Age to Interstellar
44CON London - Attacking VxWorks: from Stone Age to Interstellar44CON London - Attacking VxWorks: from Stone Age to Interstellar
44CON London - Attacking VxWorks: from Stone Age to Interstellar
 
A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...
A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...
A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages! ...
 
Offensive cyber security: Smashing the stack with Python
Offensive cyber security: Smashing the stack with PythonOffensive cyber security: Smashing the stack with Python
Offensive cyber security: Smashing the stack with Python
 
Metasploit - The Exploit Learning Tree
Metasploit - The Exploit Learning TreeMetasploit - The Exploit Learning Tree
Metasploit - The Exploit Learning Tree
 
An Introduction of SQL Injection, Buffer Overflow & Wireless Attack
An Introduction of SQL Injection, Buffer Overflow & Wireless AttackAn Introduction of SQL Injection, Buffer Overflow & Wireless Attack
An Introduction of SQL Injection, Buffer Overflow & Wireless Attack
 
Buffer overflow – Smashing The Stack
Buffer overflow – Smashing The StackBuffer overflow – Smashing The Stack
Buffer overflow – Smashing The Stack
 
Indicators of compromise: From malware analysis to eradication
Indicators of compromise: From malware analysis to eradicationIndicators of compromise: From malware analysis to eradication
Indicators of compromise: From malware analysis to eradication
 
Windows Crash Dump Analysis
Windows Crash Dump AnalysisWindows Crash Dump Analysis
Windows Crash Dump Analysis
 
Defcon 22-colby-moore-patrick-wardle-synack-drop cam
Defcon 22-colby-moore-patrick-wardle-synack-drop camDefcon 22-colby-moore-patrick-wardle-synack-drop cam
Defcon 22-colby-moore-patrick-wardle-synack-drop cam
 
Captain Hook: Pirating AVs to Bypass Exploit Mitigations
Captain Hook: Pirating AVs to Bypass Exploit MitigationsCaptain Hook: Pirating AVs to Bypass Exploit Mitigations
Captain Hook: Pirating AVs to Bypass Exploit Mitigations
 
Anatomy of a Buffer Overflow Attack
Anatomy of a Buffer Overflow AttackAnatomy of a Buffer Overflow Attack
Anatomy of a Buffer Overflow Attack
 
DEFCON 21: EDS: Exploitation Detection System WP
DEFCON 21: EDS: Exploitation Detection System WPDEFCON 21: EDS: Exploitation Detection System WP
DEFCON 21: EDS: Exploitation Detection System WP
 
SELinux Kernel Internals and Architecture - FOSS.IN/2005
SELinux Kernel Internals and Architecture - FOSS.IN/2005SELinux Kernel Internals and Architecture - FOSS.IN/2005
SELinux Kernel Internals and Architecture - FOSS.IN/2005
 
Mitigating overflows using defense in-depth. What can your compiler do for you?
Mitigating overflows using defense in-depth. What can your compiler do for you?Mitigating overflows using defense in-depth. What can your compiler do for you?
Mitigating overflows using defense in-depth. What can your compiler do for you?
 

Similar to Advanced System Security & Digital Forensics Lab Manual

theVIVI-AD-Security-Workshop_AfricaHackon2019.pdf
theVIVI-AD-Security-Workshop_AfricaHackon2019.pdftheVIVI-AD-Security-Workshop_AfricaHackon2019.pdf
theVIVI-AD-Security-Workshop_AfricaHackon2019.pdfGabriel Mathenge
 
Search for Vulnerabilities Using Static Code Analysis
Search for Vulnerabilities Using Static Code AnalysisSearch for Vulnerabilities Using Static Code Analysis
Search for Vulnerabilities Using Static Code AnalysisAndrey Karpov
 
20100309 03 - Vulnerability analysis (McCabe)
20100309 03 - Vulnerability analysis (McCabe)20100309 03 - Vulnerability analysis (McCabe)
20100309 03 - Vulnerability analysis (McCabe)LeClubQualiteLogicielle
 
Penetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityPenetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityIOSR Journals
 
AppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security AgileAppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security AgileOleg Gryb
 
Typhoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitTyphoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitDimitry Snezhkov
 
Webinar alain-2009-03-04-clamav
Webinar alain-2009-03-04-clamavWebinar alain-2009-03-04-clamav
Webinar alain-2009-03-04-clamavthc2cat
 
SAST and Application Security: how to fight vulnerabilities in the code
SAST and Application Security: how to fight vulnerabilities in the codeSAST and Application Security: how to fight vulnerabilities in the code
SAST and Application Security: how to fight vulnerabilities in the codeAndrey Karpov
 
Hacker Halted 2014 - Post-Exploitation After Having Remote Access
Hacker Halted 2014 - Post-Exploitation After Having Remote AccessHacker Halted 2014 - Post-Exploitation After Having Remote Access
Hacker Halted 2014 - Post-Exploitation After Having Remote AccessEC-Council
 
Defcon 22-zoltan-balazs-bypass-firewalls-application-whiteli
Defcon 22-zoltan-balazs-bypass-firewalls-application-whiteliDefcon 22-zoltan-balazs-bypass-firewalls-application-whiteli
Defcon 22-zoltan-balazs-bypass-firewalls-application-whiteliPriyanka Aash
 
DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...
DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...
DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...Felipe Prado
 
Static analysis: looking for errors ... and vulnerabilities?
Static analysis: looking for errors ... and vulnerabilities? Static analysis: looking for errors ... and vulnerabilities?
Static analysis: looking for errors ... and vulnerabilities? Andrey Karpov
 
SAP strikes back Your SAP server now counter attacks.
SAP strikes back Your SAP server now counter attacks.SAP strikes back Your SAP server now counter attacks.
SAP strikes back Your SAP server now counter attacks.Dmitry Iudin
 
Hacking Highly Secured Enterprise Environments by Zoltan Balazs
Hacking Highly Secured Enterprise Environments by Zoltan BalazsHacking Highly Secured Enterprise Environments by Zoltan Balazs
Hacking Highly Secured Enterprise Environments by Zoltan BalazsShakacon
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and TechniquesBala Subra
 

Similar to Advanced System Security & Digital Forensics Lab Manual (20)

theVIVI-AD-Security-Workshop_AfricaHackon2019.pdf
theVIVI-AD-Security-Workshop_AfricaHackon2019.pdftheVIVI-AD-Security-Workshop_AfricaHackon2019.pdf
theVIVI-AD-Security-Workshop_AfricaHackon2019.pdf
 
Intrusion Techniques
Intrusion TechniquesIntrusion Techniques
Intrusion Techniques
 
Search for Vulnerabilities Using Static Code Analysis
Search for Vulnerabilities Using Static Code AnalysisSearch for Vulnerabilities Using Static Code Analysis
Search for Vulnerabilities Using Static Code Analysis
 
20100309 03 - Vulnerability analysis (McCabe)
20100309 03 - Vulnerability analysis (McCabe)20100309 03 - Vulnerability analysis (McCabe)
20100309 03 - Vulnerability analysis (McCabe)
 
Penetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utilityPenetrating Windows 8 with syringe utility
Penetrating Windows 8 with syringe utility
 
AppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security AgileAppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security Agile
 
Typhoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitTyphoon Managed Execution Toolkit
Typhoon Managed Execution Toolkit
 
Webinar alain-2009-03-04-clamav
Webinar alain-2009-03-04-clamavWebinar alain-2009-03-04-clamav
Webinar alain-2009-03-04-clamav
 
SAST and Application Security: how to fight vulnerabilities in the code
SAST and Application Security: how to fight vulnerabilities in the codeSAST and Application Security: how to fight vulnerabilities in the code
SAST and Application Security: how to fight vulnerabilities in the code
 
Hacker Halted 2014 - Post-Exploitation After Having Remote Access
Hacker Halted 2014 - Post-Exploitation After Having Remote AccessHacker Halted 2014 - Post-Exploitation After Having Remote Access
Hacker Halted 2014 - Post-Exploitation After Having Remote Access
 
Defcon 22-zoltan-balazs-bypass-firewalls-application-whiteli
Defcon 22-zoltan-balazs-bypass-firewalls-application-whiteliDefcon 22-zoltan-balazs-bypass-firewalls-application-whiteli
Defcon 22-zoltan-balazs-bypass-firewalls-application-whiteli
 
The Veil-Framework
The Veil-FrameworkThe Veil-Framework
The Veil-Framework
 
DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...
DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...
DEF CON 27 - workshop ANTHONY ROSE - introduction to amsi bypasses and sandbo...
 
AntiRE en Masse
AntiRE en MasseAntiRE en Masse
AntiRE en Masse
 
Static analysis: looking for errors ... and vulnerabilities?
Static analysis: looking for errors ... and vulnerabilities? Static analysis: looking for errors ... and vulnerabilities?
Static analysis: looking for errors ... and vulnerabilities?
 
SAP strikes back Your SAP server now counter attacks.
SAP strikes back Your SAP server now counter attacks.SAP strikes back Your SAP server now counter attacks.
SAP strikes back Your SAP server now counter attacks.
 
Testing Terraform
Testing TerraformTesting Terraform
Testing Terraform
 
Hacking Highly Secured Enterprise Environments by Zoltan Balazs
Hacking Highly Secured Enterprise Environments by Zoltan BalazsHacking Highly Secured Enterprise Environments by Zoltan Balazs
Hacking Highly Secured Enterprise Environments by Zoltan Balazs
 
Kali kinux1
Kali kinux1Kali kinux1
Kali kinux1
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques
 

More from Dr. Ramchandra Mangrulkar

Manuscript Preparation using Latex: A Cloud Based Approach(Overleaf)
Manuscript Preparation using Latex: A Cloud Based Approach(Overleaf)Manuscript Preparation using Latex: A Cloud Based Approach(Overleaf)
Manuscript Preparation using Latex: A Cloud Based Approach(Overleaf)Dr. Ramchandra Mangrulkar
 
Lecture #32: Digital Forensics : Evidence Handling, Validation and Reporting
Lecture #32: Digital Forensics : Evidence Handling, Validation and ReportingLecture #32: Digital Forensics : Evidence Handling, Validation and Reporting
Lecture #32: Digital Forensics : Evidence Handling, Validation and ReportingDr. Ramchandra Mangrulkar
 
Lecture #24 : Cross Site Request Forgery (CSRF)
Lecture #24 : Cross Site Request Forgery (CSRF)Lecture #24 : Cross Site Request Forgery (CSRF)
Lecture #24 : Cross Site Request Forgery (CSRF)Dr. Ramchandra Mangrulkar
 
Lecture #18 - #20: Web Browser and Web Application Security
Lecture #18 - #20: Web Browser and Web Application SecurityLecture #18 - #20: Web Browser and Web Application Security
Lecture #18 - #20: Web Browser and Web Application SecurityDr. Ramchandra Mangrulkar
 
Lecture #15: Buffer Overflow Attack (Non Malicious Attack)
Lecture #15: Buffer Overflow Attack (Non Malicious Attack)Lecture #15: Buffer Overflow Attack (Non Malicious Attack)
Lecture #15: Buffer Overflow Attack (Non Malicious Attack)Dr. Ramchandra Mangrulkar
 
Lecture # 14: Salami and Linearization Attacks
Lecture # 14: Salami and Linearization Attacks Lecture # 14: Salami and Linearization Attacks
Lecture # 14: Salami and Linearization Attacks Dr. Ramchandra Mangrulkar
 
Lecture #12,#13 : Program and OS Security -Part I
Lecture #12,#13 : Program and OS Security -Part ILecture #12,#13 : Program and OS Security -Part I
Lecture #12,#13 : Program and OS Security -Part IDr. Ramchandra Mangrulkar
 
Lecture #9 : Single Sign on and Federation Identity Management
Lecture #9 :  Single Sign on and Federation Identity ManagementLecture #9 :  Single Sign on and Federation Identity Management
Lecture #9 : Single Sign on and Federation Identity ManagementDr. Ramchandra Mangrulkar
 
Lecture #8: Clark-Wilson & Chinese Wall Model for Multilevel Security
Lecture #8: Clark-Wilson & Chinese Wall Model for Multilevel SecurityLecture #8: Clark-Wilson & Chinese Wall Model for Multilevel Security
Lecture #8: Clark-Wilson & Chinese Wall Model for Multilevel SecurityDr. Ramchandra Mangrulkar
 

More from Dr. Ramchandra Mangrulkar (20)

Blockchain#2.pdf
Blockchain#2.pdfBlockchain#2.pdf
Blockchain#2.pdf
 
Blockchain#1.pdf
Blockchain#1.pdfBlockchain#1.pdf
Blockchain#1.pdf
 
Blockchain#3.pdf
Blockchain#3.pdfBlockchain#3.pdf
Blockchain#3.pdf
 
Manuscript Preparation using Latex: A Cloud Based Approach(Overleaf)
Manuscript Preparation using Latex: A Cloud Based Approach(Overleaf)Manuscript Preparation using Latex: A Cloud Based Approach(Overleaf)
Manuscript Preparation using Latex: A Cloud Based Approach(Overleaf)
 
Lecture #32: Forensic Duplication
Lecture #32: Forensic DuplicationLecture #32: Forensic Duplication
Lecture #32: Forensic Duplication
 
Lecture #32: Digital Forensics : Evidence Handling, Validation and Reporting
Lecture #32: Digital Forensics : Evidence Handling, Validation and ReportingLecture #32: Digital Forensics : Evidence Handling, Validation and Reporting
Lecture #32: Digital Forensics : Evidence Handling, Validation and Reporting
 
LEcture #28-#30
LEcture #28-#30LEcture #28-#30
LEcture #28-#30
 
Lecture #31 : Windows Forensics
Lecture #31 : Windows ForensicsLecture #31 : Windows Forensics
Lecture #31 : Windows Forensics
 
Lecture #25 : Oauth 2.0
Lecture #25 : Oauth 2.0Lecture #25 : Oauth 2.0
Lecture #25 : Oauth 2.0
 
Lecture #24 : Cross Site Request Forgery (CSRF)
Lecture #24 : Cross Site Request Forgery (CSRF)Lecture #24 : Cross Site Request Forgery (CSRF)
Lecture #24 : Cross Site Request Forgery (CSRF)
 
Lecture #22: Web Privacy & Security Breach
Lecture #22: Web Privacy & Security BreachLecture #22: Web Privacy & Security Breach
Lecture #22: Web Privacy & Security Breach
 
Lecture #22 : Web Privacy & Security Breach
Lecture #22 : Web Privacy & Security BreachLecture #22 : Web Privacy & Security Breach
Lecture #22 : Web Privacy & Security Breach
 
Lecture #21: HTTPS , SSL & TLS
Lecture #21: HTTPS , SSL & TLSLecture #21: HTTPS , SSL & TLS
Lecture #21: HTTPS , SSL & TLS
 
Lecture #18 - #20: Web Browser and Web Application Security
Lecture #18 - #20: Web Browser and Web Application SecurityLecture #18 - #20: Web Browser and Web Application Security
Lecture #18 - #20: Web Browser and Web Application Security
 
Lecture #15: Buffer Overflow Attack (Non Malicious Attack)
Lecture #15: Buffer Overflow Attack (Non Malicious Attack)Lecture #15: Buffer Overflow Attack (Non Malicious Attack)
Lecture #15: Buffer Overflow Attack (Non Malicious Attack)
 
Lecture # 14: Salami and Linearization Attacks
Lecture # 14: Salami and Linearization Attacks Lecture # 14: Salami and Linearization Attacks
Lecture # 14: Salami and Linearization Attacks
 
Lecture #12,#13 : Program and OS Security -Part I
Lecture #12,#13 : Program and OS Security -Part ILecture #12,#13 : Program and OS Security -Part I
Lecture #12,#13 : Program and OS Security -Part I
 
Lecture #9 : Single Sign on and Federation Identity Management
Lecture #9 :  Single Sign on and Federation Identity ManagementLecture #9 :  Single Sign on and Federation Identity Management
Lecture #9 : Single Sign on and Federation Identity Management
 
Lecture #8: Clark-Wilson & Chinese Wall Model for Multilevel Security
Lecture #8: Clark-Wilson & Chinese Wall Model for Multilevel SecurityLecture #8: Clark-Wilson & Chinese Wall Model for Multilevel Security
Lecture #8: Clark-Wilson & Chinese Wall Model for Multilevel Security
 
Lecture #6: Multilevel Security Models
Lecture #6: Multilevel Security ModelsLecture #6: Multilevel Security Models
Lecture #6: Multilevel Security Models
 

Recently uploaded

What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixingviprabot1
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture designssuser87fa0c1
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 

Recently uploaded (20)

What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Effects of rheological properties on mixing
Effects of rheological properties on mixingEffects of rheological properties on mixing
Effects of rheological properties on mixing
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
pipeline in computer architecture design
pipeline in computer architecture  designpipeline in computer architecture  design
pipeline in computer architecture design
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 

Advanced System Security & Digital Forensics Lab Manual

  • 1. Class: BE Sem: VII Course Name: Advanced System Security and Digital Forensics Laboratory Course Code: DCSL703
  • 2. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC EXPERIMENT 1 Title: Static code analysis using open source tools like RATS, Flawfinder etc. Description: Roy Ben Yosef reports that the simplest way to run Flawfinder under windows is using Python directly. Install Python 2 (version 2.7). and run the flawfinder script (on the command line). C:Python27Python.exe flawfinder –H --savehitlist=ReportFolderhitReport.hit C:MySourcesFolder In the above example you can inspect the results (hit file and html report) in the ReportFolder. Flawfinder is not a sophisticated tool. It is an intentionally simple tool, but people have found it useful. Flawfinder works by using a built-in database of C/C++ functions with well-known problems, such as buffer overflow risks (e.g., strcpy(), strcat(), gets(), sprintf(), and the scanf() family), format string problems ([v][f]printf(), [v]snprintf(), and syslog()), race conditions (such as access(), chown(), chgrp(), chmod(), tmpfile(), tmpnam(), tempnam(), and mktemp()), potential shell metacharacter dangers (most of the exec() family, system(), popen()), and poor random number acquisition (such as random()). The good thing is that you don‘t have to create this database - it comes with the tool. Flawfinder then takes the source code text, and matches the source code text against those names, while ignoring text inside comments and strings (except for flawfinder directives). Flawfinder also knows about gettext (a common library for internationalized programs), and will treat constant strings passed through gettext as though they were constant strings; this reduces the number of false hits in internationalized programs. Flawfinder produces a list of ―hits‖ (potential security flaws), sorted by risk; by default the riskiest hits are shown first. This risk level depends not only on the function, but on the values of the parameters of the function. For example, constant strings are often less risky than fully variable strings in many contexts. In some
  • 3. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC cases, flawfinder may be able to determine that the construct isn‘t risky at all, reducing false positives. Sample Output: Flawfinder version 2.0.4, (C) 2001-2017 David A. Wheeler. Number of rules (primarily dangerous function names) in C/C++ ruleset: 219 Examining test.c Examining test2.c FINAL RESULTS: test.c:32: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. test.c:56: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. test.c:57: [5] (buffer) _tcsncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. test.c:60: [5] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). Risk is high, it appears that the size is given as bytes, but the function requires size as characters. test.c:62: [5] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). Risk is high, it appears that the size is given as bytes, but the function requires size as characters. test.c:73: [5] (misc) SetSecurityDescriptorDacl: Never create NULL ACLs; an attacker can set it to Everyone (Deny All Access), which would even forbid administrator access (CWE-732). test.c:73: [5] (misc) SetSecurityDescriptorDacl: Never create NULL ACLs; an attacker can set it to Everyone (Deny All Access), which would even forbid administrator access (CWE-732). test.c:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). test.c:20: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf.
  • 4. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC test.c:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. test.c:22: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. test.c:23: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. test.c:25: [4] (buffer) scanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. test.c:27: [4] (buffer) scanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. test.c:38: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant format string for syslog. test.c:49: [4] (buffer) _mbscpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using a function version that stops copying at the end of the buffer. test.c:52: [4] (buffer) lstrcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). test.c:75: [3] (shell) CreateProcess: This causes a new process to execute and is difficult to use safely (CWE-78). Specify the application path in the first argument, NOT as part of the second, or embedded spaces could allow an attacker to force a different program to run. test.c:75: [3] (shell) CreateProcess: This causes a new process to execute and is difficult to use safely (CWE-78). Specify the application path in the first argument, NOT as part of the second, or embedded spaces could allow an attacker to force a different program to run. test.c:91: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. test.c:16: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. ANALYSIS SUMMARY: Hits = 36 Lines analyzed = 118 Physical Source Lines of Code (SLOC) = 80
  • 5. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC Hits@level = [0] 0 [1] 9 [2] 7 [3] 3 [4] 10 [5] 7 Hits@level+ = [0+] 36 [1+] 36 [2+] 27 [3+] 20 [4+] 17 [5+] 7 Hits/KSLOC@level+ = [0+] 450 [1+] 450 [2+] 337.5 [3+] 250 [4+] 212.5 [5+] 87.5 Suppressed hits = 2 (use –never ignore to show them) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (http://www.dwheeler.com/secure-programs) for more information. Testing for no ending newline: Lines analyzed = 32
  • 6. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC EXPERIMENT 2 Title : Vulnerability scanning using Nessus, Nikto (Kali Linux). Description : Nessus Nessus is public domain software released under the GPL. Nessus is designed to automate the testing and discovery of known security problems. Allowing system administrators to correct problems before they are exploited. Historically, many in the corporate world have frowned on such public domain software, instead choosing "supported" products developed by established companies. Usually these packages cost thousands of dollars and the license is based upon the number of IP addresses scanned. However, many in the corporate world are now starting to realize that public domain software, such as Nessus, NMap, Apache, and MySQL, is often superior to similar commercial products. This assessment involves three distinct phases. Scanning In this phase, Nessus probes a range of addresses on a network to determine which hosts are alive. One type of probing sends ICMP echo requests to find active hosts, but does not discount hosts that do not respond - they might be behind a firewall. Port-scanning can determine which hosts are alive and what ports they have open. This creates a target set of hosts for use in the next step. Enumeration In this phase, Nessus probes network services on each host to obtain banners that contain software and OS version information. Depending on what is being enumerated, username and password brute-forcing can also take place here. Vulnerability Detection Nessus probes remote services according to a list of known vulnerabilities such as input validation, buffer-overflows, improper configuration, and many more.
  • 7. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC Nessus is a proprietary comprehens, vulnerability scanner which is developed by Tenable Network Security. It is free of charge for personal use in a non-enterprise environment. Installation Steps: 1. Download Nessus setup file - Go to www.tenable.com -> products -> Nessus-> download - Download Nessus for ubuntu14.4 2. Install Nessus · Open a Terminal and go to the download directory (cd) · Run sudo dpkg -i Nessus*.deb. Enter root password. · Start it sudo /etc/init.d/nessusd start 3. After installation, go to https://localhost:8834 - Click on Get started for registration - Initial account setup: provide login details - Plug-in feed registration a) Go to http://www.nessus.org/register/ for registration and activation code. Register by entering user details and valid mail id. Activation code will be sent to given mail id. b) Activate using supplied activation code c) Click on download plug-in d) It will show following fetching plug-ins window
  • 8. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC - Sign in for Nessus vulnerability scanner using login name and password 4. Create scan by clicking scan-> add scan -> provide scan details(scan name, type of scan, target addr etc) 5. Check vulnerability report in Results Ref : https://docs.tenable.com/other/nessus/nessus_6.4_user_guide.pdf Basic Network scanning
  • 9. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC Advanced Scanning in General Search Ntstat port scanning
  • 10. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC Vulnerability Mapping Policies
  • 11. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC Plugins General Scanning
  • 12. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC Port scanning Creating a new Scan as a Template
  • 13. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC EXPERIMENT 3 Title : To explore the website copier HTTrack Description : HTTrack is a free (GPL, libre/free software) and easy-to-use offline browser utility. It allows you to download a World Wide Web site from the Internet to a local directory, building recursively all directories, getting HTML, images, and other files from the server to your computer. HTTrack arranges the original site's relative link-structure. Simply open a page of the "mirrored" website in your browser, and you can browse the site from link to link, as if you were viewing it online. HTTrack can also update an existing mirrored site, and resume interrupted downloads. HTTrack is fully configurable, and has an integrated help system. WinHTTrack is the Windows (from Windows 2000 to Windows 10 and above) release of HTTrack, and WebHTTrack the Linux/Unix/BSD release. Download from https://www.httrack.com/page/2/en/index.html
  • 14. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
  • 15. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC EXPERIMENT 4 Title : Exploring Router and VLAN security, setting up access lists using Cisco Packet tracer(student edition) Description : To explore router security, the routers can be configured by setting passwords and user authentication. Router>en Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R1 R1(config)#enable password cisco R1(config)#enable secret student R1(config)#service password-encryption R1(config)#username mita privilege 15 password 0 cisco Setting up VLANs 1. Configure two VLANs on each switch, VLAN 10 and VLAN 20. S1(config)#vlan 10 S1(config-vlan)#vlan 20 S2(config)#vlan 10 S2(config-vlan)#vlan 20 S3(config)#vlan 10 S3(config-vlan)#vlan 20 2. Use the show vlan and show vlan brief command to verify your VLANs. Notice that all interfaces are in VLAN 1 by default S1#sh vlan S1#sh vlan brief 3. Configuring VLAN Interfaces S1(config)#interface vlan 10
  • 16. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC S1(config-if)#ip address 10.10.10.1 255.255.255.0 S1(config-if)#interface vlan 20 S1(config-if)#ip address 20.20.20.1 255.255.255.0 Configuring and Verifying Trunk Links S1#config t S1(config)#interface fa0/15 S1 (config-if)#switchport trunk encapsulation dot1q S1 (config-if)#switchport mode trunk S1 (config-if)#interface fa0/16 S1 (config-if)#switchport trunk encapsulation dot1q S1 (config-if)#switchport mode trunk S1 (config-if)#interface fa0/17 S1 (config-if)#switchport trunk encapsulation dot1q S1 (config-if)#switchport mode trunk S1 (config-f)#interface fa0/18 S1 (config-if)#switchport trunk encapsulation dot1q S1 (config-if)#switchport mode trunk Setting up Access control lists using Cisco packet tracer ● Access control lists (ACLs) can be used for two purposes on Cisco devices: to filter traffic, and to identify traffic. ● Access lists are a set of rules, organized in a rule table. Each rule or line in an access-list provides a condition, either permit or deny: Router(config)#access-list 10 deny 172.16.10.0 0.0.0.255 ● This tells the router to match the first three octets exactly but that the fourth octet can be anything:
  • 17. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC Assume there is a webserver on the 172.16.x.x network with an IP address of 172.16.10.10. In order to block network 172.18.0.0 from accessing anything on the 172.16.0.0 network, EXCEPT for the HTTP port on the web server, we would create the following access-list on Router B: Router(config)# access-list 101 permit tcp 172.18.0.0 0.0.255.255 host 172.16.10.10 eq 80 Router(config)# access-list 101 deny ip 172.18.0.0 0.0.255.255 172.16.0.0 0.0.255.255 Router(config)# access-list 101 permit ip any any The first line allows the 172.18.x.x network access only to port 80 on the web server. The second line blocks 172.18.x.x from accessing anything else on the 172.16.x.x network. The third line allows 172.18.x.x access to anything else. To apply this access list, we would configure the following on Router B: Router(config)# int e0 Router(config-if)# ip access-group 101 in
  • 18. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC EXPERIMENT 5 Title: Detect SQL injection vulnerabilities in a website database using SQLMap Description: SQL injection (SQLi) refers to an injection attack wherein an attacker can execute malicious SQL statements (also commonly referred to as a malicious payload) that control a web application‘s database server (also commonly referred to as a Relational Database Management System – RDBMS). Since an SQL injection vulnerability could possibly affect any website or web application that makes use of an SQL-based database, the vulnerability is one of the oldest, most prevalent and most dangerous of web application vulnerabilities. By leveraging SQL injection vulnerability, given the right circumstances, an attacker can use it to bypass a web application‘s authentication and authorization mechanisms and retrieve the contents of an entire database. SQL injection can also be used to add, modify and delete records in a database, affecting data integrity. To such an extent, SQL injection can provide an attacker with unauthorized access to sensitive data including, customer data, personally identifiable information (PII), trade secrets, intellectual property and other sensitive information. SQLMAP: sqlmap is an open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of database servers. It comes with a powerful detection engine, many niche features for the ultimate penetration tester and a broad range of switches lasting from database fingerprinting, over data fetching from the database, to accessing the underlying file system and executing commands on the operating system via out- of-band connections. Step 1: Installation of sqlmap $ sudo apt-get install sqlmap
  • 19. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC Step 2 : List information about the existing databases To check access to a database, - - dbs option can be used. - - dbs lists all the available databases. It notifies vulnerability in parameter cat, various payloads executed, name of backend database, its version and list of all available databases. Here, two databases: acuart and information_schema are listed. $ sqlmap -u http://testphp.vulnweb.com/listproducts.php?cat=1 --dbs Step 3: Listing tables present in Database Each of the database can further explored to get tables information from them. Option -D can be used to specify the name of the database we need to explore. If access to the database is allowed, we can access the tables using --tables option along with name of
  • 20. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC database. Here, acuart database is accessed and all available tables in that database are listed as an output of the following command. $ sqlmap -u http://testphp.vulnweb.com/listproducts.php?cat=1 -D acuart --tables Step 4: List column information of a particular table Columns of a particular table can be viewed by specifying -T option before table name and --columns option to query the column names. Access to table and its column for table "products" is displayed by following command. $ sqlmap -u http://testphp.vulnweb.com/listproducts.php?cat=1 -D acuart -T products –columns
  • 21. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC Step 5: Dump the data from the columns Information from specific column can be retrieved and displayed using -C. Multiple column can also be listed separated by a comma and the –dump query retrieves the data. Flowing command shows all Domain values of column name from product table from acuart database. $ sqlmap -u http://testphp.vulnweb.com/listproducts.php?cat=1 -D acuart -T products -C name -- dump
  • 22. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
  • 23. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC EXPERIMENT 6 Title : Analysis of forensic images using open source tools like Autopsy: SIFT, and commercial tool FTK Imager. Description : FTK imager is a forensic duplication tool available for Windows platform. Download from link:- http://accessdata.com/product-download/digital- forensics/ftk-imager-lite-version-3.1.1 •Steps: –Run FTK Imager.exe to start the tool. –From the File menu, select Create a Disk Image .
  • 24. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC 3. Select source
  • 25. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC 4. Select Drive 5. Click Add... to add the image destination.
  • 26. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC 6. Select Image Type 7. Fill evidence information
  • 27. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC 8. Select image destination folder 9. Check verify images after they are created
  • 28. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC Using Autopsy for analysis: It is an inbuilt tool in Kali Linux for analyzing the forensic image.
  • 29. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC New Case Information Select Image
  • 30. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
  • 31. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
  • 32. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC Analyzing emails Report Generation
  • 33. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
  • 34. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC EXPERIMENT 7 Title : Analysis of forensic images using open source tools like Autopsy: SIFT, and commercial tool FTK Imager. Description : FTK imager is a forensic duplication tool available for Windows platform. Download from link:- http://accessdata.com/product-download/digital- forensics/ftk-imager-lite-version-3.1.1 •Steps: –Run FTK Imager.exe to start the tool. –From the File menu, select Create a Disk Image .
  • 35. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC 3. Select source
  • 36. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC 4. Select Drive 5. Click Add... to add the image destination.
  • 37. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC 6. Select Image Type 7. Fill evidence information
  • 38. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC 8. Select image destination folder 9. Check verify images after they are created
  • 39. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC Using Autopsy for analysis: It is an inbuilt tool in Kali Linux for analyzing the forensic image.
  • 40. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC New Case Information Select Image
  • 41. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
  • 42. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
  • 43. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC Analyzing emails Report Generation
  • 44. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
  • 45. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC EXPERIMENT 8 Title : Use of steganographic tools like OpenStego, to detect data hiding or unauthorized file copying Description : OpenStego, the free steganography solution. OpenStego provides two main functionalities: ● Data Hiding: It can hide any data within a cover file (e.g. images). ● Watermarking (beta): Watermarking files (e.g. images) with an invisible signature. It can be used to detect unauthorized file copying. Using OpenStego Using OpenStego is pretty straightforward. There are two modes of operation - data hiding and watermarking. Data Hiding In this mode, you can either hide the data (file) inside an image or extract the data from the image. Check screenshots below to see how it can be done: Hide data
  • 46. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC Extract data Watermarking (beta) In this mode, you can watermark / verify images with your signature. First you need to generate signature file, and then it can be used to watermark images or verify the same later. Check screenshots below to see how it can be done: Generate signature
  • 47. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC Embed watermark
  • 48. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC Verify watermark
  • 49. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC EXPERIMENT 9 Title : Use Password cracking using tools like John the Ripper/Cain and Abel/ Ophcrack to detect weak passwords. Description: According to the official website, Cain & Abel is a password recovery tool for Microsoft Operating Systems. It allows easy recovery of various kinds of passwords by sniffing the network, cracking encrypted passwords using Dictionary, Brute-Force and Cryptanalysis attacks, recording VoIP conversations, decoding scrambled passwords, recovering wireless network keys, revealing password boxes, uncovering cached passwords and analyzing routing protocols. The latest version is faster and contains a lot of new features like APR (ARP Poison Routing) which enables sniffing on switched LANs and Man-in-the-Middle attacks. The sniffer in this version can also analyze encrypted protocols such as SSH-1 and HTTPS and contains filters to capture credentials from a wide range of authentication mechanisms. The new version also ships routing protocols authentication monitors and routes extractors, dictionary and brute-force crackers for all common hashing algorithms and for several specific authentications, password/hash calculators, cryptanalysis attacks, password decoders and some not so common utilities related to network and system security.Cain & Abel is a tool that will be quite useful for network administrators, teachers, professional penetration testers, security consultants/professionals, forensic staff and security software vendors. First we need to download Cain & Abel, so go to the download page www.oxid.it/cain.html. After downloading it,just run the Self-Installing executable package and follow the installation instructions.
  • 50. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC
  • 51. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC Usage Now after launching the application, we have to configure it to use appropriate network card.If you have multiple network cards, it‘s better to know the MAC address of the network card that you will use for the sniffer.To get the MAC address of your network interface card, do the following: 1- Open CMD prompt. /p> 2- Write the following command ―ipconfig /all‖. 3- Determine the MAC address of the desired Ethernet adapters, write it on Notepad, and then use this information to help determine which NIC to select in the Cain application. Now click Configure on the main menu. It will open the configuration dialog box where you can select the desired network interface card. Now let‘s go through the configuration dialog tabs and take a brief look at most of them: Sniffer Tab: This tab allows us to specify which Ethernet interface card we will use for sniffing.
  • 52. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC ARP Tab: This tab allows us to configure ARP poison routing to perform ARP poisoning attack, which tricks the victim‘s computer by impersonating other devices to get all traffic that belongs to that device, which is usually the router or an important server. Filters and Ports Tab: This tab has the most standard services with their default port running on.You can change the port by right-clicking on the service whose port you want to change and then enabling or disabling it. Cain‘s sniffer filters and application protocol TCP/UDP port. HTTP Fields Tab: There are some features of Cain that parse information from web pages viewed by the victim such as LSA Secrets dumper, HTTP Sniffer and ARP-HTTPS,so the more fields you add to the username and passwords fields, the more you capture HTTP usernames and passwords from HTTP and HTTPS requests. Here is an example: The following cookie uses the fields ―logonusername=‖ and ―userpassword=‖ for authentication purposes. If you don‘t include these two fields in the list, the sniffer will not extract relative credentials. GET /mail/Login?domain=xxxxxx.xx&style=default&plain=0 HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */* Referer: http://xxx.xxxxxxx.xx/xxxxx/xxxx Accept-Language: it Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.3); .NET CLR 1.1.4322) Host: xxx.xxxxxx.xx Connection: Keep-Alive Cookie: ss=1; logonusername=user@xxxxxx.xx; ss=1; srclng=it; srcdmn=it; srctrg=_blank; srcbld=y; srcauto=on; srcclp=on; srcsct=web; userpassword=password; video=c1; TEMPLATE=default; Traceroute Tab: Traceroute is a technique to determine the path between two points by simply counting how many hops the packet will take from the source machine to reach the
  • 53. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC destination machine. Cain also adds more functionality that allows hostname resolution, Net mask resolution, and Whois information gathering. Certificate Spoofing Tab: This tab will allow Certificate spoofing. From Wikipedia: ―In cryptography, a public key certificate (also known as a digital certificate or identity certificate) is an electronic document that uses a digital signature to bind a public key with an identity — information such as the name of a person or an organization, their address, and so forth. The certificate can be used to verify that a public key belongs to an individual. In a typical public key infrastructure (PKI) scheme, the signature will be of a certificate authority (CA). In a web of trust scheme, the signature is of either the user (a self-signed certificate) or other users (―endorsements‖). In either case, the signatures on a certificate are attestations by the certificate signer that the identity information and the public key belong together.‖ We can simply think of it as some sort of data (cipher suites & Public key and some other information about the owner of the certificate) that has information about the destination server and is encrypted by trusted companies (CA) that are authorized for creating these types of data.The server sends its own certificate to the client application to make sure it‘s talking to the right server. Certificate Collector Tab: This tab will collect all certificates back and forth between servers and clients by setting proxy IPs and ports that listen to it. Challenge Spoofing Tab: Here you can set the custom challenge value to rewrite into NTLM authentications packets. This feature can be enabled quickly from Cain‘s toolbar and must be used with APR. A fixed challenge enables cracking of NTLM hashes captured on the network by means of Rainbow Tables. Password Cracking Now it‘s time to speak about the cracker tab, the most important feature of Cain. When Cain captures some LM and NTLM hashes or any kind of passwords for any supported protocols, Cain sends them automatically to the Cracker tab. We will
  • 54. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC import a local SAM file just for demonstration purposes to illustrate this point. Here is how to import the SAM file: Here are the 4 NTLM and LM hashes which will appear like the following image: And here you will find all possible password techniques in the following image:
  • 55. Advanced System Security & Digital Forensics Lab Manual Sem 7 DLOC As you can see from the previous image, there are various types of techniques that are very effective in password cracking. ------X-------X------