Report 41 60
Report 41 60
40
51.503 - Secure Software Engineering
41
51.503 - Secure Software Engineering
42
51.503 - Secure Software Engineering
43
51.503 - Secure Software Engineering
44
51.503 - Secure Software Engineering
45
51.503 - Secure Software Engineering
46
51.503 - Secure Software Engineering
Example 1:
Fig 4.13 Fortify Hard Coded Encryption Key finding and possible recommendation
47
51.503 - Secure Software Engineering
Example 2:
48
51.503 - Secure Software Engineering
Static analysis is a valuable tool for code review because it can identify potential
vulnerabilities, bugs, and quality issues in the code before it is deployed. However,
there are some challenges that can arise when using static analysis for code review.
One challenge is that static analysis tools can produce false positives, which can
lead to wasted time and effort when developers investigate issues that turn out to be
non-issues. To address this challenge, it's important to configure the static analysis
tool to minimise false positives, and to provide developers with guidance on how to
differentiate between true and false positives.
Another challenge is that static analysis tools may not detect all types of issues,
particularly those that involve complex logic or dynamic behaviour. To address this
challenge, it's important to combine static analysis with other forms of code review,
such as manual code review or dynamic testing.
49
51.503 - Secure Software Engineering
Finally, static analysis tools may be difficult to integrate into existing development
processes or toolchains. To address this challenge, it's important to evaluate static
analysis tools carefully before adopting them, and to ensure that they integrate well
with existing development tools and processes.
50
51.503 - Secure Software Engineering
5. Black Box
basicCart2 Precondition: product added to Total amount should reflect the Success. Cart was updated to reflect
cart.
Remove some/all products latest ∑ 𝑝𝑟𝑖𝑐𝑒𝑖 latest ∑ 𝑝𝑟𝑖𝑐𝑒𝑖
𝑖 𝑖
from cart
cartUpdate1 Precondition: product added to Cart updated to remove product Success. Cart was updated after
cart. from cart. product was deleted from DB.
Delete product from DB after
adding it to cart.
modifyPrice Precondition: product added to Cart updated to reflect latest price. Success. Cart was updated to reflect
cart, price needs to be latest price.
positive.
Update product price after
adding it to cart
negativePrice Adding/updating product with Exception error handled: Price Fail. Product added/updated with
negative price. cannot be negative. negative price.
51
51.503 - Secure Software Engineering
processPayment Paypal payment amount Payment amount reflects the order Success. Payment amount reflects the
reflects the order amount. amount. order amount.
cartUpdate2 Precondition: product added to Cart icon quantity should match Fail. Mismatch of quantity.
cart. with quantity in cart.
Delete product from DB after
adding it to cart.
Update cart icon quantity.
inputValidation When entering name in form, Exception error handled: warning Fail. Still processes user input.
should validate user input to message for special characters in
prevent XSS name.
52
51.503 - Secure Software Engineering
6. Penetration Testing
Penetration testing, also known as pen testing, is a process of assessing the security
of a system by simulating an attack on it. The purpose of penetration testing is to
identify vulnerabilities and weaknesses in a system before they can be exploited by
attackers. It is an essential part of any security program, and it helps organisations
identify and remediate vulnerabilities in their systems before they can be exploited by
attackers. Penetration testing can be done manually or with the help of automated
tools, such as Burp Suite.
The primary purpose of both penetration testing and fuzzing is to identify potential
security vulnerabilities in a system. They help to identify and remediate
vulnerabilities before they can be exploited by attackers, thereby reducing the risk of
data breaches and other security incidents.
Another key feature of Burp Suite is its ability to intercept and modify requests and
responses between the client and server. This enables testers to manipulate
application behaviour and test the application's resilience to attacks such as
parameter tampering, session hijacking, and input validation bypass.
Moreover, Burp Suite has a wide community of users who constantly update and
develop new plugins and extensions for the tool. This means that testers have
access to a vast library of plugins that extend the tool's functionality and allow for
more targeted and effective testing. The tool's user-friendly interface and
53
51.503 - Secure Software Engineering
customizable workflows also make it easy for testers to use and adapt to their
specific needs.
The following tests were conducted to attempt to uncover potential security issues
relating to the website.
To perform a brute force attack using Burp Suite Intruder on the user ID and
password fields of a website using Burp Suite, we captured the login request using
Burp Suite's proxy functionality as shown in Figure 6.1.
Next, we configured the attack parameters in Burp Suite Intruder, such as the target
URL, the payload (i.e., the list of possible passwords), and the attack type. For the
attack type, we set "cluster bomb" to try a predefined list of words i.e. rockyou.txt as
shown in Figure 6.2 and 6.3.
54
51.503 - Secure Software Engineering
Once the attack starts, the tool systematically attempts to send a login request to the
website using the predefined password. From the response received shown in
Figure 6.4, we observed that one of the predefined passwords i.e. admin was able
login to the website successfully.
55
51.503 - Secure Software Engineering
Implementing these measures can significantly reduce the risk of a successful brute
force attack on a login page using Burp Suite predefined password.
56
51.503 - Secure Software Engineering
To perform a SQL injection attack on the user ID and password fields of a website
using Burp Suite, the same approach was adopted to capture the login request using
Burp Suite's proxy functionality.
Similarly, we used Burp Suite's Intruder tool to modify the login request by inserting
malicious SQL commands into the user ID and password fields. This is done by
using Burp Suite to add a payload to the user ID and password fields, containing
SQL commands such as SELECT or UNION. The tool will systematically try each
combination of SQL commands in the payload list, sending a login request to the
website after each attempt as shown in Figure 6.5.
The SQL injection attack is unsuccessful as the backend database did not execute
the SQL commands and return the requested information. This is likely due to
Django ORM which provided protection against SQL injections.
57
51.503 - Secure Software Engineering
We used Burp Suite Proxy to intercept and modify the data being sent between the
client and the server. Upon clicking “PayPal”, a shown in Figure 6.6 and 6.7, we
observed that the total payment amount was intercepted and was the same as what
was presented in the earlier webpage i.e. $259.
58
51.503 - Secure Software Engineering
As shown in Figure 6.8, we modified the total payment amount to $8.88 before
proceeding with the payment by forwarding the request to the server.
59