FCS Assignment 3: Etash Tyagi 2019360 December 2021
FCS Assignment 3: Etash Tyagi 2019360 December 2021
FCS Assignment 3: Etash Tyagi 2019360 December 2021
Etash Tyagi
2019360
December 2021
1 Software Testing
1.1 Recoverability
• In the context of software, recoverability is the capability for re-establishing its level of
performance and recovering the data affected by any system failures or attacks.
• Data recovery can be ensured by storing data in secondary storages to prevent the complete
loss of data.
• For a chat application, messages can also be stored on the local device of the user (either
via browser cache or local storage), hence eliminating the use of storage altogether. In
this case after a failure, the worst thing that can happen is one message is not delivered
to the destination.
• If for some reason message must be stored on the database, RAID (redundant array of
independent disks) can be used to introduce redundancy, to make it easier to recover from
disk failure.
• Along with that data can also be stored in offline servers at multiple different machines
to be used in case of failure.
• The hardware should also be tested to ensure minimal chance of complete failure.
1.2.1 A
Automatic code analysis is a kind of code testing done by softwares which try to detect errors
and vulnerabilities and bring them to the developer’s attention. The types of code analysis and
their examples are:
1
• Control Flow Analysis: Checks the order in which code is executed, finds unreachable
code, checks for loops with multiple entry and exit points.
Example: int main(){return -1; int x = -1;}
• Data Use Analysis: Detects variables, data stored in them, datatype validation, etc...
Detects errors like unused variables, variables written twice, usage of uninitialized vari-
ables, etc...
Example: int main(){int x; return x;}
1.2.2 B
Regression testing is done to find accidental changes in code via finding unwanted behaviour.
It is typically done after major changes in the code to find out unexpected bugs which might
arise as a result of the intended change.
• Phone must either stay locked when a call comes, or must lock after it is picked.
• Opening applications on the lock screen must not unlock the mobile.
• Opening applications on the lock screen (like camera) must not expose user data.
• The notification bar should have limited buttons, clicking on which does not unlock the
phone.
2
1.3.2 Test Specific For Face Unlock
Following (in addition to above) are test cases for face unlock:
• Facial features used for recognition must be hashed or encrypted and not shared with any
one.
• Facial recognition should be able to detect when eyes of the individual is closed to prevent
unwarranted access.
• Make sure images captured for recognition are not cached, and hence do not bloat the
system.
• Make sure there is another way to unlock for the owner (eg: two factor authentication via
registered email) in case the front camera stops working.
The test cases for unlocking the phone (1.3.1) still stay relevant (assuming face unlock is com-
pletely replaced). In addition to that following are few test cases for the new feature:
• Fingerprint used for recognition must be hashed or encrypted and not shared with any
one.
• Make sure there is another way to unlock for the owner (eg: two factor authentication via
registered email) in case the fingerprint recognition hardware stops working.
• Make sure features specific to previous functionality are no longer present for new one.
3
2 Metasploitable
Assumption:
2.1 OS Version
2.1.1 Summary
1. Open terminal.
2.1.3 Result
4
Figure 2: Nmap Find OS
2.2.1 Summary
2. Why: -p- is used for all ports, -sV is used for service version (used in future).
1. Open terminal.
4. Ports with STATE=open are open, with SERVICE running on it, with VERSION being
the application using these ports.
5
2.2.3 Result
Following are the open ports and services and versions on them:
2.3.1 Summary
1. Open terminal.
6
2. Install msfconsole if not already installed.
4. Search for vulnerabilities in FTP using service version (search ”vsftpd 2.3.4”)
2.3.3 Result
7
2.4 Mutillidae add-to-your-blog.php
2.4.1 Summary
3. Outcome: Wrong date was put in blog entries, (multiple statements are disabled, this is
the biggest exploit possible here).
2.4.3 Results
8
Figure 8: SQL Command
2.5.1 Summary
3. For Login credentials put command ”’ UNION SELECT * FROM accounts #” in user-
name and ”a” in password to get list of all login credentials (result in fig 10).
9
to see list of all tables and their database.
6. The database credentials are generally found in mysql.user table, to find columns en-
ter following command in username : ”’ UNION SELECT 1, TABLE SCHEMA, TA-
BLE NAME, COLUMN NAME, 1 FROM INFORMATION SCHEMA.COLUMNS WHERE
TABLE NAME=’user’ AND TABLE SCHEMA=’mysql’ #” and ”a” in password to see
columns.
7. We find User, Password and Host columns are necessary to login to the database.
8. Finally to leak database credentials, enter ”’ UNION SELECT 1, User, Password, Host,
1 FROM mysql.user #” in username and ”a” in password.
2.5.3 Results
Following is the way to replicate the attack and the results found out:
10
Figure 11: SQL Error
11
Figure 14: SQL Get Columns Of User Table
12
Figure 17: Delete Table SQL Command
13