5th sem Biswadeep Internship Report
5th sem Biswadeep Internship Report
By
Biswadeep Paul
Reg Id: D212202356
Intern Id:
Dept: Cyber Forensics & Information Security
1
Table of Contents
1. Acknowledgement .....................................................................................
2. Certificate of Approval ..............................................................................
3. Contac Info ............................................................................................
4. Assessment Overview ...............................................................................
5. Assessment Component ...........................................................................
6. Severity Ratings .......................................................................................
7. Scope........................................................................................................
8. Vulnerability Summary & Report Card ......................................................
9. Technical Findings ....................................................................................
Finding 1: SQL Injection Flaws ............................................................
Finding 2: Authorization Bypass ..........................................................
Finding 3: Cross-Site Scripting Flaws ...................................................
Finding 4: Inadequate Security Standards for Password Storage ........
10. Conclusion .............................................................................................
2
Acknowledgement
BISWADEEP PAUL
3
Certificate of Approval
The project was undertaken during the 3rd year and involved extensive
research, critical analysis, and practical implementation. The project showcases
the student's ability to apply theoretical knowledge, think independently, and
demonstrate problem-solving skills in the chosen field of study.
The project has been evaluated and assessed by the examination committee,
and the student has demonstrated a high level of competence and
understanding of the subject matter. The committee commends the student's
dedication, effort, and commitment to academic excellence.
We, therefore, hereby confer this Certificate of Approval upon Biswadeep Paul in
recognition of the successful completion of the college project.
4
Contact Information
Assessment Overview
From October 9th, 2023 to November 8th, 2023, Sturtle Security engaged Behala
Government Polytechnic’s CFS Student to evaluate the security posture of its
infrastructure compared to current industry best practices that included an Web-
application penetration test. All testing performed is based on the NIST SP
800-115 Technical Guide to Information Security Testing and Assessment,
OWASP Testing Guide (v4), and customised testing frameworks.
Phases of penetration testing activities include the following:
• Planning – Customer goals are gathered and rules of engagement
obtained.
5
Assessment Component
Severity Ratings
The following table defines levels of severity and corresponding CVSS score
range that are used throughout the document to assess vulnerability and risk
impact.
Severity CVSS V3 Definition
Score
Range
Critical 9.0-10.0 Exploitation is straightforward and usually
results in system-level compromise. It is
advised to form a plan of action and patch
immediately.
6
Severity CVSS V3 Definition
Score
Range
Scope
Assessment Details
Scope Exclusions
Per client request, BGPS did not perform any of the following attacks during
testing:
• Phishing/Social Engineering
All other attacks not specified above were permitted by Sturtle Security.
7
Vulnerability Summary
The following table summarizes the findings. Each finding is broken out in detail by
risk immediately after the summary table.
Finding Risk
1. SQL Injection Flaws Critical
CVSS SCORING
Industry Standards
Summary
When data enters a web application without being properly sanitized, it may
expose the application to several categories of vulnerabilities. One of these
categories is the injection of Confidential and Proprietary All Rights Reserved
Secure Ideas, LLC 8 [email protected] +1 (866) 404-7837 Structured
Query Language (SQL) by a third party. This type of attack is commonly referred
8
to as SQL injection.
SQL injection occurs when data is inserted or appended into an application input
parameter, and that input is used to dynamically construct a SQL query. When a
web application fails to properly sanitize data, which is passed on to dynamically
create SQL statements, it is possible for an attacker to alter the construction of
back-end SQL statements.
Finding
Secure Ideas discovered that the login page of the Juice-shop application is
vulnerable to SQL Injection. This is due to the use of unsanitized user supplied
input. Using the parameters„ = OR 1=1-- , as the username and any password,
Secure Ideas was able to login as the Admin account. Considering Admin was
the first user listed in the application, it was therefore used due to the exploit
payload.
As shown in the following screenshots, the admin account was the first
account listed in the application. Additional accounts could be accessed by
using ' or 1=1 and email not like('%admin%');-- and so on.
9
Authorization Bypass
Industry Standards
Summary
Finding
Secure Ideas has found that the Juice shop application contains an authorization
bypass flaw. During the testing Secure Ideas was able to create an admin
account with an unauthenticated session.
In the Juice Shop API, Secure Ideas discovered that an attacker or malicious
user couldcreate a new user with the role of admin.
The following description explains how Secure Ideas was able to perform this
attack.
As shown below, the new user has been created with administrative privileges:
10
HIGH RISK FINDINGS
Industry Standards
Summary
Cross-site scripting flaws are typically classified by two attributes: whether they
are persisted and whether they are reflected. When a persisted exploit is used,
the payload is stored, and executes again on subsequent visits to the vulnerable
page. The classic example is server-side persistence in the database. Because
the data in the database may be shared between users, it is possible for an
attacker to simply add the payload through a shared data field in order to
11
circumvent the need for social engineering. This is predicated on the
attacker being able to add the payload from either a legitimate account or an
unauthenticated context. Even when social engineering is necessary to
introduce the payload, if it is in shared data, it can still reach other users in
addition to the original target. Persistence is not necessarily always on the
server, however, and could instead be stored in cookies set by JavaScript. In
more modern applications, the local Storage and indexed DB client-side APIs
may be used as well.
The other attribute used for classification is whether it is a reflected flaw. If it is
reflected, the flaw is in the handling of input that is sent to the server and returns
in a response. The database-persisted example does this, and could therefore
be considered both reflected and persisted. An unpersisted example would be
an error message returned from the server that unsafely includes a value from
the input.
In all cases, the malicious scripts are executed in a context that appears to have
originated from the targeted site. This gives the attacker full access to the
document retrieved, providing almost unlimited control over the victim‟s
experience using the application. A wide variety of options are available for
crafting an effective exploit, which may incorporatesome of the following:
●Sending application data to a server controlled by the attacker
● Using the victim‟s session to access additional data or functionality
● Stealing cookies that are not protected with the httponly flag
● Manipulating the view presented to the victim for a social engineering
purpose, such as faking a session timeout to prompt for a login or convincing
the user to install something
● Stealing data from sensitive input boxes, such as account credentials or
credit cardinformation
● Launching attacks against or harvesting data from other applications open to
interaction with the current domain through a cross-origin resource sharing
(CORS) policy, potentially using the victim‟s cookie-stored credentials
● Changing links on the page to include the cross-site scripting payload in
other pages as the user navigates the site
Finding
Secure Ideas discovered that Juice Shop‟s applications are vulnerable to cross-
site scripting (XSS) due to the application‟s use of input within the response to
the user. Many of the flaws identified were persisted through the database, and
many could be exploited by an unauthenticated attacker without relying on a
direct social engineering attack such as phishing. One example of an XSS flaw
is within the user profile page of the Juice Shop application. An attacker can
replace the track-result id with a JavaScript iframe payload.
When a payload, such as is submitted in the browser address bar, it causes the
application to incorporate the attack within the resulting web page. The
12
screenshot below is what the victim browser would see.
Industry Standards
Summary
If passwords are not regularly changed, if the algorithm is not salted (ensuring that
no two encoded passwords are the same), and if the encryption is inadequate,
then a business faces the risk that an attacker will access every account in the
database for a period of time until the attack is discovered.
Finding
Due to the SQL injection flaw above, Secure Ideas found that the Users of the
Juice Shop stores passwords. Analysis of the password table revealed that
passwords are stored as a MD5 hash of the user’s original password. The following
13
screenshot shows a sample from the data.
MD5 is a hashing algorithm that is known to have problems that allow for
cryptographic collisions, meaning that two different pieces of data can produce the
same MD5 hash. MD5 also lends itself to brute force attacks due to the relatively
low computational power ittakes to generate an MD5 hash.
In addition, the MD5 hashes that Secure Ideas found were not salted. This is evident
by thefact that several of the password hashes in the previous screenshot are identical.
Password salts make it much harder for an attacker to crack a password hash as it
requires the attacker to know the salt value in order to start cracking the hashes.
Conclusions
14