VAPT_Project_Report
VAPT_Project_Report
VAPT_Project_Report
Vulnerability Assessment
& Penetration Testing
on Altoro Mutual, Inc.
Performed By:
Mr. Dhruv Makani
Ms. Malini
Mr. Sarim Syed
Mr. Suhas Dhole
Acknowledgement
INSTRUCTIONS
Hosts
HOST: Altoro Mutual, Inc.
SCOPE: https://demo.testfire.net/
PORT: 443/ 80
______________________ ____
INDEX
1. OWASP: BROKEN ACCESS CONTROL
2. VULNERABILITY NAME: BRUTE FORCE
AFFECTED RESOURCES/URL:
http://demo.testfire.net/bank/login.aspx
PARAMETER: login.aspx
IMPACT:
• Attackers guess the website's user name and password by
repeatedly attempting to conduct form-based login using
user name and password in the dictionary.
• User name and password enumeration threatens websites that
have no restriction on failed login attempts.
RECOMMENDATION:
1. Restrict login failures to lock the account when certain
amount of login failures has reached.
• The user-registered password must meet the intended
complexity requirements. For example, the password must
be a combination of no less than 8 characters of the
following: lowercase letters, uppercase letters, digits,
and special characters ~!@#$%^&*()-+_. For users with
unqualified passwords, the registration should not be
allowed.
2. Increase the complexity of the password.
• Users are advised to change the default passwords
occurring during installation to make them satisfy the
preceding requirements.
POC:
Username | Password
admin | admin
jsmith | Demo1234
sspeed | Demo1234
tuser | tuser
IMPACT:
Scenario #1:
• An application encrypts credit card numbers in a
database using automatic database encryption. However,
this data is automatically decrypted when retrieved,
allowing a SQL injection flaw to retrieve credit card
numbers in clear text.
Scenario #2:
• A site doesn't use or enforce TLS for all pages or
supports weak encryption. An attacker monitors network
traffic (e.g., at an insecure wireless network),
downgrades connections from HTTPS to HTTP, intercepts
requests, and steals the user's session cookie. The
attacker then replays this cookie and hijacks the user's
(authenticated) session, accessing or modifying the
user's private data. Instead of the above they could
alter all transported data, e.g., the recipient of a
money transfer.
Scenario #3:
• The password database uses unsalted or simple hashes to
store everyone's passwords. A file upload flaw allows an
attacker to retrieve the password database. All the
unsalted hashes can be exposed with a rainbow table of
pre-calculated hashes. Hashes generated by simple or
RECOMMENDATION:
• Prohibit the use of the RC4 cipher algorithm on the
server.
• Prohibit the use of the RC4 cipher algorithm in the TLS
configuration of the browser on the client.
POC:
SSL Info:
Subject: /CN=demo.testfire.net
Ciphers: ECDHE-RSA-AES256-GCM-SHA384
Issuer: /C=GB/ST=Greater
Manchester/L=Salford/O=Sectigo Limited/CN=Sectigo
RSA Domain Validation Secure Server CA
AFFECTED RESOURCES/URL:
http://demo.testfire.net/index.jsp?content=inside_jobs.htm
PARAMETER: inside_jobs.htm
IMPACT:
• Sensitive Data Exposure happens when an application
doesn't enough secure touchy data. The information can
fluctuate and anything from passwords, meeting tokens,
charge card information to private wellbeing information
and more can be uncovered. As the finding just applies to
delicate information, the potential effect is constantly
viewed as high.
• What the information comprises of shifts thus does the
effect. The peril lies in the information being uncovered,
and the potential effect mirrors the information's
affectability. Touchy information presentation happens
because of not enough securing a database where data is
put away.
• This may be a consequence of a huge number of things, for
example, powerless encryption, no encryption, programming
blemishes, or when somebody erroneously transfers
information to an inaccurate database.
• Various sorts of information can be uncovered in a
delicate information introduction. Banking account
RECOMMENDATION:
The initial step is to make sense of what information can
be viewed as delicate and in this manner essential to secure.
At the point when that is done, turn out every one of these
information focuses and ensure that:
• The information is never put away in clear content.
• The information is never sent in clear content. Model
among database and worker, or over the web.
• The calculations used to scramble the information are
viewed as sufficient.
• The age of the keys is secure.
• Program headers are set to not store when the delicate
information is introduced to end-client.
• Here are a few hints that can help.
POC:
The response appears to contain suspicious comments which
may help an attacker.
Note: Matches made within script blocks or files are against
the entire content not only comments.
Screenshot of the rendered page containing this vulnerability.
RECOMMENDATION:
• Disable NTFS 8.3 file compatibility. This function is
enabled by default. However, it is unnecessary for most
users to enable this function.
• For users of virtual host space, apply the following
solutions:
• Change the following registry key to 1:
o HKLMSYSTEMCurrentControlSetControlFileSystemNtfsDisabl
e8dot3NameCreation. This change can prevent creation
of filenames in NTFS8.3 format, while existing short
filenames cannot be removed.
o If asp.net is not required in your web environment,
you choose "IIS Manager > Web Service Extensions >
ASP.NET" and disable this function.
o Upgrade Microsoft .NET Framework to 4.0 or later.
POC:
(valid)http://demo.testfire.net/*~1*\a.aspx
(invalid)http://demo.testfire.net/1234567890*~1*\a.aspx
AFFECTED RESOURCES/URL:
• http://demo.testfire.net/comment.aspx
• http://demo.testfire.net/bank/login.aspx
PARAMETER:
• comment.aspx
• login.aspx
RECOMMENDATION:
• Check the networking request to check whether all the
expected parameters and values exist. When the parameter
POC:
http://demo.testfire.net/comment.aspx
(POST)reset=Clear+Form&name=13800138000&email_addr=atestu@examp
le.com&comments=atestu&subject=atestu
http://demo.testfire.net/comment.aspx
(POST)name=13800138000&email_addr=atestu@example.com&submit=Sub
mit&comments=atestu&subject=atestu
http://demo.testfire.net/bank/login.aspx
(POST)btnSubmit=Login&passw="())[]]{}}'/@^*$;#,&uid=atestuser
AFFECTED RESOURCES/URL:
• http://demo.testfire.net/robots.txt
• http://demo.testfire.net/index.aspx
• http://demo.testfire.net/bank/mozxpath.js
• http://demo.testfire.net/default.htm
PARAMETER:
• /robots.txt
• /index.aspx
• /mozxpath.js
• /default.htm
RECOMMENDATION:
Delete the email address from the Website so that
malicious users cannot exploit it.
POC:
URL http://demo.testfire.net/robots.txt
Verify Message: test@test.com
Request Method: GET
URL http://demo.testfire.net/index.aspx
Verify Message: test@test.com
Request Method: GET
URL http://demo.testfire.net/bank/mozxpath.js
Verify Message: km0ti0n@gmail.com
Request Method: GET
URL http://demo.testfire.net/default.htm
Verify Message: skipfish@example.com
Request Method: GET
OWASP: Injection
VULNERABILITY NAME: SQL Injection
SEVERITY: High-Risk
DESCRIPTION:
• Sql injection (sqli) is a web security vulnerability that
allows an attacker to interfere with the queries that an
application makes to its database.
• It generally allows an attacker to view data that they are
not normally able to retrieve.
• This might include data belonging to other users, or any
other data that the application itself is able to access.
• In many cases, an attacker can modify or delete this data,
causing persistent changes to the application's content or
behavior.
• A successful sql injection attack can result in
unauthorized access to sensitive data, such as passwords,
credit card details, or personal user information.
• Many high-profile data breaches in recent years have been
the result of sql injection attacks, leading to
reputational damage and regulatory fines. In some cases,
an attacker can obtain a persistent backdoor into an
organization's systems, leading to a long-term compromise
that can go unnoticed for an extended period.
• There are a wide variety of SQL injection vulnerabilities,
attacks, and techniques, which arise in different
situations. Some common SQL injection examples include:
o Retrieving hidden data, where you can modify an SQL
query to return additional results.
o Subverting application logic, where you can change a
query to interfere with the application's logic.
o UNION attacks, where you can retrieve data from
different database tables.
o Examining the database, where you can extract
information about the version and structure of the
database.
o Blind SQL injection, where the results of a query you
control are not returned in the application's
responses.
RECOMMENDATION:
• Most instances of sql injection can be prevented by using
parameterized queries (also known as prepared statements)
instead of string concatenation within the query.
• The following code is vulnerable to SQL injection because
the user input is concatenated directly into the query:
o String query = "SELECT * FROM products WHERE category
= '"+ input + "'";
o Statement statement = connection.createStatement();
o ResultSet resultSet = statement.executeQuery(query);
o This code can be easily rewritten in a way that
prevents the user input from interfering with the
query structure:
o PreparedStatement statement =
connection.prepareStatement("SELECT * FROM products
WHERE category = ?");
o statement.setString(1, input);
o ResultSet resultSet = statement.executeQuery();
• Parameterized queries can be used for any situation where
untrusted input appears as data within the query,
including the WHERE clause and values in an INSERT or
UPDATE statement. They can't be used to handle untrusted
input in other parts of the query, such as table or column
names, or the ORDER BY clause.
• Application functionality that places untrusted data into
those parts of the query will need to take a different
POC:
Was able to easily get through the login page of
demo.testfire.net, accessible at
http://demo.testfire.net/login.jsp by using the payload ' Or
'1'='1.
AFFECTED RESOURCES/URL:
• https://demo.testfire.net/search.jsp
• https://demo.testfire.net/login.aspx
• https://demo.testfire.net/comment.aspx
PARAMETER:
• search.jsp
login.aspx
POST /sendFeedback
name= XSS
IMPACT:
• Cross site scripting (XSS) steals information from users
through exploitation of website vulnerabilities. Users
often click links on the page while browsing a website,
using Instant Messaging software, or reading emails.
Attackers can embed malicious code into the link and then
steal user information or execute malicious code on the
terminal user system.
• Main problems caused by XSS attacks include:
o Account hijacking—attackers can hijack user sessions
before session cookie expires, and operate with
RECOMMENDATION:
• Preventing cross-site scripting is trivial in some cases
but can be much harder depending on the complexity of the
application and the ways it handles user-controllable
data.
• In general, effectively preventing XSS vulnerabilities is
likely to involve a combination of the following measures:
• Filter input on arrival.
• At the point where user input is received, filter as
strictly as possible based on what is expected or valid
input.
• Encode data on output.
POC:
• You can confirm most kinds of XSS vulnerability by
injecting a payload that causes your own browser to
execute some arbitrary JavaScript. It's long been common
practice to use the alert() function for this purpose
because it's short, harmless, and pretty hard to miss when
it's successfully called. In fact, you solve the majority
of our XSS labs by invoking alert() in a simulated
victim's browser.
• Unfortunately, there's a slight hitch if you use Chrome.
From version 92 onward (July 20th, 2021), cross-origin
iframes are prevented from calling alert(). As these are
used to construct some of the more advanced XSS attacks,
you'll sometimes need to use an alternative PoC payload.
In this scenario, we recommend the print() function.
• Using Search Bar to find XSS Vulnerability
Payloads:
<script>alert(“XSS”)</script>
<svg onload=confirm(“XSS”)>
<img src=x onerror=confirm(“XSS”)>
AFFECTED RESOURCES/URL:
• https://demo.testfire.net/search.jsp
• https://demo.testfire.net/feedback.jsp
PARAMETER:
• search.jsp
POST /sendFeedback
name= Clickjacking
email_addr= Clickjacking
IMPACT:
The Impact of Clickjacking The hacker has several ways
they can use the redirected clicks for their own gain. A common
form of clickjacking involves mirroring a login and password
form on a website.
RECOMMENDATION:
• We have discussed a commonly encountered browser-side
prevention mechanism, namely frame busting scripts.
However, we have seen that it is often straightforward for
an attacker to circumvent these protections. Consequently,
server driven protocols have been devised that constrain
browser iframe usage and mitigate against clickjacking.
• Clickjacking is a browser-side behavior and its success or
otherwise depends upon browser functionality and
conformity to prevailing web standards and best practice.
Server-side protection against clickjacking is provided by
defining and communicating constraints over the use of
components such as iframes. However, implementation of
protection depends upon browser compliance and enforcement
of these constraints. Two mechanisms for server-side
clickjacking protection are X-Frame-Options and Content
Security Policy.
POC:
Payload: <iframe id="evil" src="https://evil.com"
sandbox="allow-forms"></iframe>
AFFECTED RESOURCES/URL:
https://demo.testfire.net/login.jsp
PARAMETER: login.jsp?uid=test&pass=1234
IMPACT:
• A successful brute force attack for default credentials
can result in unauthorized access to sensitive data, such
as admin controls, credit card details, or personal user
information.
RECOMMENDATION:
• To prevent such type of misconfiguration of security ,
Change or unify Admin Credentials from Default Credentials
• Try to adopt 8-length password policy with unique and
difficult to crack passwords by brute forcers.
POC:
The length sections as brute force attempted 36
combinations of uid and passwords , attempt no. 14 and 16 gave
283 length which differs from 145 length common for any other
attempted combinations. Which predicting that these 2
combinations are success for brute forcing and giving us the
default credentials.
AFFECTED RESOURCES/URL:
65.61.137.117:443
http://demo.testfire.net/
RECOMMENDATION:
There should be a patch management process in place to:
POC:
Found some extremely high-risk issues related to security
misconfiguration:
• Debugger is enabled
• Incorrect directory permissions
• Using default accounts and passwords
• Setup/config pages enabled
SSL Info:
Subject: /CN=demo.testfire.net
Ciphers: ECDHE-RSA-AES256-GCM-SHA384
Issuer: /C=GB/ST=Greater Manchester/L=Salford/O=Sectigo
Limited/CN=Sectigo RSA Domain Validation Secure Server CA
POC:
Supported ciphers (by Protocol)
TLSv1.0
ECDHE-RSA-AES256-SHA: LUCKY13
DHE-RSA-AES256-SHA: LUCKY13
ECDHE-RSA-AES128-SHA: LUCKY13
DHE-RSA-AES128-SHA: LUCKY13
TLSv1.1
ECDHE-RSA-AES256-SHA: LUCKY13
DHE-RSA-AES256-SHA: LUCKY13
ECDHE-RSA-AES128-SHA: LUCKY13
DHE-RSA-AES128-SHA: LUCKY13
TLSv1.2
ECDHE-RSA-AES256-GCM-SHA384
ECDHE-RSA-AES256-SHA384: LUCKY13
ECDHE-RSA-AES256-SHA: LUCKY13
DHE-RSA-AES256-GCM-SHA384
DHE-RSA-AES256-SHA256: LUCKY13
DHE-RSA-AES256-SHA: LUCKY13
ECDHE-RSA-AES128-GCM-SHA256
ECDHE-RSA-AES128-SHA256: LUCKY13
ECDHE-RSA-AES128-SHA: LUCKY13
DHE-RSA-AES128-GCM-SHA256
DHE-RSA-AES128-SHA256: LUCKY13
DHE-RSA-AES128-SHA: LUCKY13
IMPACT:
• Failing to log errors or attacks and poor monitoring
practices can introduce a human element to security risks.
• Threat actors count on a lack of monitoring and slower
remediation times so that they can carry out their attacks
before you have time to notice or react.
• It’s essential to have functional logging and monitoring
systems, as they provide logs and information to give
timely alerts to the system if any malfunction or error
occurs. This protects the system from further damage.
• However, these issues don't frequently cause any
vulnerability. Logging and monitoring become especially
important in tracing back when the system shows any
abnormal behavior. Their failure or absence highly impacts
transparency, visibility, and incident alerting.
• If the system doesn't maintain any logging mechanism, or
these mechanisms fail, there is no audit trail for events
and security analysis. Therefore, attackers can keep
damaging our system because their identity and method of
attacking cannot be easily determined.
• The illustration below shows how logs help identify the
patterns. The illustration also provides information for
system improvement and maintenance
RECOMMENDATION:
The following measures can be taken to avoid logging and
monitoring failures:
• Make sure that all login and failed attempts are logged
properly.
• Maintain an updated copy of all the logs that are useful
in case the server faces any issues.
• The logs should be kept in a formatted manner that can be
used by other functions and log management solutions.
Unformatted logs can be a burden to look into.
• Ensure that the monitoring and logging system alerts in
real time. Alerting and alarming the system after the
damage has been done is not beneficial.
• Protect the logs to ensure their integrity.
POC:
TOOLS USED:
• Burp Suite - Application Security Testing Software
• OWASP ZAP - Zed Attack Proxy
• SQLmap - Automatic SQL injection and database takeover tool
• Nmap - the Network Mapper
• Nikto - web server scanner
• dirsearch - Web path discovery
REFERENCES:
https://bugcrowd.com/vulnerability-rating-taxonomy
https://owasp.org/www-project-top-ten/
https://owasp.org/Top10/A01_2021-Broken_Access_Control/
https://owasp.org/Top10/A02_2021-Cryptographic_Failures/
https://owasp.org/Top10/A03_2021-Injection/
https://owasp.org/Top10/A05_2021-Security_Misconfiguration/
https://owasp.org/Top10/A06_2021-Vulnerable_and_Outdated_Components/
https://owasp.org/Top10/A07_2021-Identification&AuthFailures/
https://owasp.org/Top10/A09_2021-SecurityLogging&MonitoringFailures/
https://portswigger.net/web-security/sql-injection
https://portswigger.net/web-security/authentication
https://portswigger.net/web-security/information-disclosure
https://portswigger.net/web-security/cross-site-scripting
https://portswigger.net/web-security/clickjacking
https://portswigger.net/web-security/dom-based
https://portswigger.net/web-security/deserialization
https://github.com/payloadbox/xss-payload-list
https://github.com/swisskyrepo/PayloadsAllTheThings
https://github.com/danielmiessler/SecLists