project
project
• Phase I:
Software Artifact This includes the implementation of the AlphaBank engine, as well as supporting
files for its deployment and functionality.
Requirements Analysis An accompanying document outlining the architecture of the software, as
well as the mechanisms you implemented to achieve the security goals.
• Phase II:
Attack Software Any scripts used to carry out the attack, as well as their description (in code)
Final Presentation A presentation outlining your methodology and findings when attacking another
team’s Software Artifact.
More specifics about the Software Artifact and Requirements Analysis will be provided in Section 3.
1
2 Phase I: Project Requirements
This section outlines the requirements for how you are intended to implement this software components. I’m
describing the project as a contract would, which usually outlines requirements, and specifications for the
requirements. Your ability to satisfy these requirements is part of the grade of your Phase I deliverable.
The application needs to run as a single-call binary (i.e., no sub-commands). It is possible to use an
interpreter, e.g., such as python
With the above requirement in mind, consider that you can use whatever language of your choice. How-
ever, its necessary for you to allow your peers to build their software. When in doubt, ask whether you can
bundle a compiler or how to better make a software easy to build for your peers.
The application needs to be containerized. This means, you should use a Dockerfile or Podfile or
whichever to bootstrap your application
In order to simplify sharing the code, I ask of you that you bundle your application inside of a container.
I recommend using docker or podman, but I really don’t care as long as it is OCI [2] compliant.
Lastly, we will require network connectivity
The application needs to listen on TCP port 6201. This port is arbitrarily chosen
The engine must support arbitrary commands from a connected user. These commands will also take
an arbitrary number of parameters. Communication should be done at line end, and not streaming
byte-by-byte. This is often found as line-mode — as opposed to character mode — in terminals and
protocools
2
For example, see the listing below:
This would allow me to log into your system using my username Santiago and the password AlphaC00l!.
This interface is strictly plaintext! Using any cutesy/fancy HTTP engines, or SSH, or Protobuf, or XMLRPC
is prohibited.
Speaking of which, in addition to command support, We must also provide feedback to the user via a
prompt. The example above showed us an AlphaBank> prompt to let the user know they were using the
AlphaBank online system.
A prompt should show information about the state of the system to the user.
The only two things to provide to the user on the prompt is the AlphaBank> banner, as well as the
currently logged in user, and the role1 . See for example this banner showing a logged in user acting as an
administrator role:
AlphaBank(Santiago:ADMIN)>
The system should allow for more than 3, and up to 16 different users, tellers, and admins (total)
carrying out commands simultaneously
This is very low for any self-respecting bank, but I believe that supporting 16 users max is “fair” for this
contract.
Users I.e., clients of AlphaBank. They will send and request money
Tellers I.e., employees of alphabank. They can enroll users, deposit and withdraw money
Admins i.e., the head honcho. They can do whatever they want
The AlphaBank system can support users and roles and these are assigned by an Administrator.
Roles limit the commands that each user can carry out in the system.
In other words, the roles limit which commands each user can make. By default, the AlphaBank engine
comes with a default user that can be used to bootstrap the system.
The application comes in with an encoded default admin user admin with the password Spookytus
All users, including the admin, has an assigned list of funds, which are deposited by tellers upon confir-
mation in person (we will handwave this in practice). Funds increase in one of the following three conditions:
1 more on this below
3
Deposit A teller is presented with cash, which is deposited and the corresponding funds are assigned to the
right account
Withdraw A client requests their money back, and the amount is substracted from the right account
Transfer Two clients request a money transfer. Funds from one acount are moved into another account.
2.2.4 Persistence
Besides the features described above, the system must support persistence. This is, if the application is
restarted, the users, passwords, roles and funds must be recoverable. A database or any storage backend
should allow for this.
Since we are using docker, you are welcome to use either a second container (e.g., with a database), or a
volume, or plainly saving the file (which would mean we need to restart the container instance rather than
re-launch each. All of these are valid.
4
2.3 Security Requirements
The above describes the requirements in terms of functionality. We also need to ensure the safety of Alpha-
Bank’s customers and, thus, we must set forth some security requirements as well.
2.3.1 Confidentiality
Password confidentiality is perhaps the most important of them all.
Confidentiality of password information must be provided even in the case of database breach
Any logged in user can’t obtain visibility over the funds of any other user.
Lastly, the mere knowledge that a user holds an account in our bank can put them at risk.
It is impossible for a logged in user to know the existence of another user without providing the
username of such user
Note that the first requirement assumes an attacker stole the database. The second and third one does
not necessarily do so.
2.3.2 Integrity
Besides confidentiality, we must also ensure the integrity of the system. Perhaps the most important aspect
in this regard is funds integrity.
This is akin to law 0 of thermodynamics: no funds shall be created or destroyed (unless they are
deposited or withdrawn). This also includes known bugs in banking software such as double-spend.
Funds shall never be allowed to go under 0
In addition, we want to make sure that the integrity of user information cannot be maliciously modified.
5
Requirement S.15 Name: Transaction Integrity
2.3.3 Availability
There is only one availability requirement:
The system should not crash with a malicious user or teller input
That is, we must ensure that a malicious user is not able to crash the bank for everybody.
Malicious Insider: A malicious insider does not have access to the system, but is able to obtain a copy
of the database and analyze it to carry out malicious tasks. This copy of the database is not loaded back
into the system, so no modifications of the database should affect the behavior of the running system.
An attacker of this nature can choose whenever to “pause” the application (i.e., shut it down) to study
the database. Once done analyzing, they can bring it back up and attack the application.
Malicious Client: A malicious client will send crafted input to the application to achieve malicious results.
These include, but are not limited to: 1) stealing funds from another user or 2) Becoming a user with higher
privilege.
Malicious Teller: A malicious teller will send crafted input to the application to achieve malicious results.
These include, but are not limited to: 1) carry out unauthorized transactions, or 2) Becoming a user with
higher privilege.
Info
If you’re using git: git-archive is a useful subcommand to do this!
• The sourcecode
6
• A Dockerfile to build such sourcecode
• A README.md file describing the steps needed to build and test. Please include teammate information
here for simplicity
• A client.sh script to connect to the built binary
• Anything else that you think will help us run your application
References
[1] Netcat 1.10. https://nc110.sourceforge.io/.
[2] Open container initiative. https://opencontainers.org/.