Task 1
Task 1
Shadowfox-vinaysharma-all
Table of Content
LIST of Figures
Figure No Name Page No
Introduction:
In the realm of cybersecurity, understanding and identifying vulnerabilities in web
applications is crucial for safeguarding against potential cyber threats. As part of
my internship task, I was tasked with performing various security assessments on
the website http://testphp.vulnweb.com/. These assessments included:
Port Scanning:
The first task involved identifying all open ports on the target website. By
conducting a port scan, we aimed to uncover any potential entry points that
could be exploited by malicious actors to gain unauthorized access to the web
server.
Machine Information:
Description:
The target website,
http://testphp.vulnweb.com/, serves as a purposely vulnerable web application
designed for security testing and educational purposes. It contains various known
vulnerabilities, providing an ideal environment for conducting security
assessments and practicing penetration testing techniques.
Environment:
The assessments were conducted in a controlled environment using virtual
machines to ensure the safety and integrity of both the target website and the
testing infrastructure.
Tools Used:
Scope:
The scope of the security assessments included identifying and exploiting
vulnerabilities present on the target website. Specifically, the tasks focused on
port scanning, directory brute forcing, and network traffic interception to assess
the website's security posture and uncover potential weaknesses.
Disclaimer:
It's important to note that all assessments were performed ethically and with
explicit permission from the website owner. The findings and recommendations
presented in this report are intended solely for educational and improvement
purposes and do not constitute any unauthorized or malicious activity.
http://testphp.vulnweb.com/
Now we are going to use kali Linux for whole testing purpose lets start with
Nmap to fine the open ports, here Nmap is tool calling command after that we
used verbosity mode to view the content while scanning ( -v ) .
now we used ( T4 to make scanning more faster and then our target
Fig 1
Since here we have completed our scanning and hence we just found only one
port which is also known as port 80 http )
DirBuster is a popular tool used in penetration testing and ethical hacking for
discovering hidden directories and files on web servers. It operates by sending
HTTP requests to a target web server and analyzing the server's responses to
identify existing directories and files. This process, known as directory brute
forcing, involves systematically attempting to access directories by trying various
combinations of common directory names and paths.
Kali Linux, a popular operating system for penetration testing and ethical hacking,
includes a variety of wordlists located in the directory /usr/share/wordlists/ . Among
these wordlists is the "medium.txt" list, which contains a curated selection of
common words and phrases suitable for use in directory brute forcing and other
penetration testing activities. This wordlist provides a balance between coverage
and efficiency, making it a valuable resource for discovering directories on target
websites.
Fig 2
output
Fig 3
Fig 4
Analyzing Credentials:
Using Filters:
Demonstrating Effectiveness:
The use of Wireshark for intercepting network traffic during the login process
of the target website demonstrated its effectiveness in capturing sensitive
information transmitted over the network. By analyzing the captured packets,
we were able to identify plaintext credentials exchanged between the client
and server, highlighting potential security vulnerabilities such as the
transmission of sensitive data without encryption.
Fig 5
Fig 6
Click the login button to submit the form, initiating a POST request to the
server.
Fig 7
Look for packets containing HTTP POST requests, which typically include
the login credentials within the request body.
Examine the packet's contents, focusing on the request body to locate the
transmitted credentials.
Fig 8
Additional Information:
Mitigation steps :
The vulnerabilities identified through the described security assessments on
the website http://testphp.vulnweb.com/ include:
Port Scanning:
Regular Port Scans: Conduct regular port scans to detect and promptly
address any new or unexpected open ports.
Title:
Cybersecurity Tasks Report
Date:
23 March, 2024
Prepared By:
Vinay Sharma
Table of Content
S.No Content Page No
2 Machine Information 2
6 Mitigation Strategies 20
7 Conclusion 20
LIST of Figures
1 Hashcat Command 3
2 Hashcat Result 3
3 Veracrypt Installation 3
8 PE Explorer EntryPoint 6
13 Metasploit Preparation 10
Task Details:
Tools Used:
Veracrypt
Text Editor
Approach:
So let's crack the hash with the hash cat Hashcat is the best tool for the cracking
the hash and it is really too fast .
here we have the hash it seems like it use MD5 algo so move to the Hashcat ant
provide this hast in the form of text file
fig(1)
m 0 specifies the MD5 encryption algorithm for the hash. Following that, we use a
fig(2)
fig(3)
fig(4)
fig(5)
Afterward, we will mount the encrypted file to view its hidden content. However, it
will first require the password, which we have already cracked using Hashcat.
fig(6)
And boom here we found the hidden text which is (never give up)
fig(7)
Findings:
Tools Used:
PE Explorer
Approach:
Use PE Explorer to analyze the executable and locate the entry point address.
fig(8)
opening the file in veracrypt and after few sec we found the entry point
fig(9)
Tools Used:
Metasploit
msfvenom
Text Editor
Approach:
Launch Metasploit and select the appropriate payload
( windows/meterpreter/reverse_tcp ).
So here this is a attacker machine from here we are going to create a payload for
windows 7 and i am using kali machine because whatever too I need it is already
installed on it
fig(10)
And this is my windows machine as from Ip you can note that both machine are in
same network
fig(11)
Let's now create a payload using MSFvenom, a popular tool for payload creation.
It offers a variety of payload types, even for Linux and Mac.
I've successfully created a payload with a size of 73802 bytes. The next step is to
transfer it to the server.
fig(12)
To transfer the payload GTA.exe) from a webpage, we will use Python's default
server running on port 8000.
fig(13)
Before proceeding, let's prepare our attacker machine to listen for the reverse
shell as the victim installs the payload. We'll accomplish this using the MSF
console Metasploit).
fig(14)
fig(15)
From the 'show option' command, we can view the settings for the exploit. Next,
we will listen on port 4444.
fig(16)
fig(17)
We need to open the webpage using the attacker's IP because we are running the
HTTP server from there. Therefore, we must use the same IP and port set up on
the attacker's machine. Due to a previous issue, I changed the port from 8000 to
8800.
fig(18)
here we can see we have captured the reverse shell of our windows machine lets
try some basic command to verify it
fig(19)
fig(20)
now same thing lets try on our windows machine and verify the output of the
whoami command
fig(21)
fig(22)
Findings:
Mitigation:
Ensure strong and unique passwords are used to encrypt files with Veracrypt
to prevent unauthorized access.
Educate users about the risks of opening executable files from untrusted
sources.
Conclusion:
The decryption process was successful, allowing access to the encrypted
Veracrypt file and retrieving the secret code.
The entry point address of the Veracrypt executable was identified using PE
Explorer.
Date:
24 March, 2024
Prepared By:
Vinay Sharma
Table of Content
S.NO Content Page no
LIST of Figures
Fig No Name Page no
Executive Summary:
This report documents the findings of a security assessment conducted on the
website http://testphp.vulnweb.com/. The assessment identified significant
vulnerabilities, including SQL injection and Local File Inclusion LFI, which could
potentially compromise the confidentiality, integrity, and availability of the website
and its data. This report outlines the vulnerabilities discovered, the methods used
for exploitation, and recommendations for remediation to enhance the security
posture of the website.
Findings:
Exploitation:
SQL Injection:
URL http://testphp.vulnweb.com/artists.php?artist=1'
Exploitation: Further testing revealed the ability to extract data from the
database using SQL injection payloads.
Here looking out website manually I have found this directory which contain in
URL ‘1ʼ it seems like something will help to to find vulnerabilities
FIG1
Let's try to put anything in that parameter and let's see what's happen so here I
think I should put admin if there should any error it will show
FIG2
So here my guess was absolutely right here we are getting error in that we are
able to see that it's saying something sql database so I think we should attack on
the basis of database so I will try to use sql map to pull out the vulnerabilities of
this website
FIG3
And one thing more here I have also found the login web page where I think user
password are going to be stored in some kind of database so I think if we
elaborate the database we can get the user name and password
FIG4
So here as I said we are going to use sql map to find out the vulnerability on the
basis of some parameters where it has present so here I am using command like
sql map And -u represent that we are going to put url after putting the url target
website after that we are going to adding some crawl to find out a more deep and
deep so — crawl 2
FIG5
So after some processing time the tool has found some websites where we can
perform an attack and also sql map as a automated tool so we do not need to do
many things as such manually as the automation it will save lot of time so here I
have found one url which is stored in my home As you can see here I have
highlighted it has created one folder as name result so lets see the url
FIG6
So here we got one url where I think we can perform in a square attack to find the
sum databases and tables so lets see what we get here
FIG7
So as we know sql map is an automation tool we are going to specify the url after
that I am putting a command of current database to show the database as I don't
know nothing about this website so I am used to find the database as well as host
name of this website so lets see what we get in the result
FIG8
Year after some processing time we can see the database name which is acuart
FIG9
So now we have the host name accuart or you may say the database accurate so
now we are going to find the How many tables are present in that particular
database
FIG10
So here we can see the eight tables are present in the database so there are many
but I think we are found something related to user so there is a user table where I
think we can get something precious for us
FIG11
FIG12
So I was absolutely right about this here we found some emails and username and
password which are stored in the normal text usually we don't have to save the
things normally we have to keep it at hash or adding some salt and encrypting the
things so anyone else cannot see the things whatever we are saving out in the
database so let's try the username and password on the website it is true or not
FIG13
FIG14
And boom here we're login in the website that we can see the details I like phone
number and many more
FIG15
To finding the details I have noticed that sql map has doing brute force and it was
really worth able but it takes a few time to complete it and it successfully found
the details
FIG16
So here we can also see the cart id and price of that particular product so this
should not happen in the sum regular website it will causeway many damages or
reputation damage
Result: Successfully included the /etc/passwd file from the server's file system.
Exploitation: Demonstrated the ability to read sensitive system files using LFI.
After sequel I have note that we have one more website that seems like it might be
present lfi which is also known as local file inclusion so here we can see the
details of the content which is saved on the server in the file format so let's try the
lfi it is too easy so I will keep it to simple to make the understand anyone
FIG17
So we are fetching the data from the website directly in our terminal from our curl
tool so after the file I am going back like we are doing in the machine changing the
directories so here I want to visit the etc password file so lets try and get the
output
FIG18
So here it is successfully done and we are able to see the file of the server and it
might causeway many damage to the system or the organisation
File Inclusion Controls: Validate and sanitize user input to prevent Local File
Inclusion vulnerabilities. Limit file inclusion to specific directories and avoid
including files based on user-supplied input.
Patch Management: Keep software and frameworks up to date with the latest
security patches and updates to address known vulnerabilities and mitigate
emerging threats.
Conclusion:
The discovery of SQL injection and Local File Inclusion vulnerabilities in
http://testphp.vulnweb.com/ underscores the importance of robust security
measures in web application development. By addressing these vulnerabilities and
implementing proactive security measures, the website can enhance its resilience
against potential attacks and safeguard the confidentiality, integrity, and
availability of its data and resources.