Java代写 | COMP3911 Secure Computing Coursework 2


COMP3911 Secure Computing
Coursework 2

1 The Vulnerable Application
HushHush Bank is a small offshore bank providing discreet financial services to important customers.
The code you are provided with represents a part of HushHush’s online banking application that provides
customers with the ability to check the balance on their accounts.
This application is rather crude and has been implemented by an inexperienced Java developer who has no
formal training in secure system development. The code is of poor quality and there are several security
issues affecting it.
The application uses Jetty as a built-in web server. Request processing is done by a Servlet. Data storage
is provided by an SQLite 3 database, and queries of the database are done using JDBC. HTML pages are
generated using the Freemarker template engine.
2 Getting Started
Go to the Assessment/Coursework 2 folder in Minerva, download and unzip it. Then cd
into the bank subdirectory. Application source code can be found under src.
You can build the application and run the web server from the bank directory by entering ./gradlew run
on a Linux or macOS command line. Omit the ./ from this command if using Windows.
NOTE: This will be very slow the first time that it runs, as it needs to download not only the Gradle build
system but also the application’s dependencies. Subsequent runs should be a lot faster.
Once the server is running, you can access the application by visiting http://localhost:8080/ in a
browser. You can shut down the server at any time by pressing Ctrl+C in the command window from which
you ran Gradle.
3 Exercises
3.1 Remote Attacker
In this exercise, you play the role of a remote attacker whose only access to the vulnerable application is via
its web interface. Experiment with this interface and then answer the following questions.
1. How many accounts does Nigel Farage have? [1 mark]
2. Explain how you found the answer to the previous question. [4 marks]
3.2 Attacker with Local Access
Now play the role of an attacker who has gained access to the machine running the server—which means
that they can inspect any of the files that the server uses at runtime. You should also assume that the attacker
has been able to inspect the source code.
1. How has the developer tried to protect the database? [1 mark]
2. What is wrong with this approach to protecting the database? [4 marks]
3. Who has deposited the most money? Why has Mary Jones deposited money? [2 marks]
4. Explain briefly how you found the answers to the previous question. [2 marks]
5. Outline how the handling of passwords could be improved. [4 marks]
Tip: answering Questions 1 & 2 will suggest approaches that can be used to answer Question 3. There are
at least two different approaches that you could use here. You won’t necessarily need to write any additional
code yourself. Careful inspection of the source code will be helpful.
3.3 Fixing the Issues
Now play the role of a developer brought in to fix the security issues.
1. Fix the issue you observed when playing the role of the remote attacker (Section 3.1). Then write a
couple of sentences to explain what you have done and why it fixes the issue. [4 marks]
2. Fix one other security issue in the application. You could either make the improvements suggested
for Question 5 of Exercise 3.2 or you could choose something different. There are at least two other
possibilities here. Write a couple of sentences to explain what you have done. [5 marks]


本网站支持淘宝 支付宝 微信支付  paypal等等交易。如果不放心可以用淘宝交易!

E-mail: [email protected]  微信:itcsdx