Skip to content

Commit 4483730

Browse files
committed
Added attack code to perform Intent Sniffing
1 parent 17a30db commit 4483730

40 files changed

Lines changed: 774 additions & 9 deletions

File tree

InsecureBankv2.apk

562 Bytes
Binary file not shown.

InsecureBankv2/.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

InsecureBankv2/app/app-debug.apk

562 Bytes
Binary file not shown.

InsecureBankv2/app/src/main/java/com/android/insecurebankv2/ChangePassword.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ private void broadcastChangepasswordSMS(String phoneNumber, String pass) {
221221
{
222222
Intent smsIntent = new Intent();
223223
smsIntent.setAction("theBroadcast");
224+
// String actdns= smsIntent.getAction().toString();
225+
// Toast.makeText(getApplicationContext(),actdns , Toast.LENGTH_LONG).show();
224226
smsIntent.putExtra("phonenumber", phoneNumber);
225227
smsIntent.putExtra("newpass", pass);
226228
sendBroadcast(smsIntent);

InsecureBankv2/app/src/main/java/com/android/insecurebankv2/LoginActivity.java

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
public class LoginActivity extends Activity {
3333
// The Button that calls the authentication function
3434
Button login_buttons;
35-
// The EditText that holds the username entered by the user
35+
// The Button that calls the create user function
36+
Button createuser_buttons;
37+
// The EditText that holds the username entered by the user
3638
EditText Username_Text;
3739
// The EditText that holds the password entered by the user
3840
EditText Password_Text;
@@ -59,6 +61,15 @@ public void onClick(View v) {
5961
// TODO Auto-generated method stub
6062
performlogin();
6163
}
64+
});
65+
createuser_buttons = (Button) findViewById(R.id.button_CreateUser);
66+
createuser_buttons.setOnClickListener(new View.OnClickListener() {
67+
68+
@Override
69+
public void onClick(View v) {
70+
// TODO Auto-generated method stub
71+
createUser();
72+
}
6273
});
6374
fillData_button = (Button) findViewById(R.id.fill_data);
6475
fillData_button.setOnClickListener(new View.OnClickListener() {
@@ -77,11 +88,22 @@ public void onClick(View v) {
7788

7889
}
7990

80-
/*
81-
The function that allows the user to autofill the credentials
82-
if the user has logged in successfully atleast one earlier using
83-
that device
84-
*/
91+
/*
92+
The function that allows the user to create new user credentials.
93+
This functionality is available only to the admin user.
94+
<<WIP Code>>
95+
ToDo: Add functionality here.
96+
*/
97+
protected void createUser() {
98+
Toast.makeText(this, "Create User functionality is still Work-In-Progress!!", Toast.LENGTH_LONG).show();
99+
100+
}
101+
102+
/*
103+
The function that allows the user to autofill the credentials
104+
if the user has logged in successfully atleast one earlier using
105+
that device
106+
*/
85107
protected void fillData() throws UnsupportedEncodingException, InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException {
86108
// TODO Auto-generated method stub
87109
SharedPreferences settings = getSharedPreferences(MYPREFS, 0);

README.markdown

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ InsecureBankv2 Readme
55
This is a major update to one of my previous projects - "InsecureBank". This vulnerable Android application is named "InsecureBankv2" and is made for security enthusiasts and developers to learn the Android insecurities by testing this vulnerable application. Its back-end server component is written in python. The client component i.e. the Android InsecureBank.apk can be downloaded along with the source. The list of vulnerabilities that are currently included in this release are:
66

77
* Flawed Broadcast Receivers
8+
* Intent Sniffing and Injection
89
* Weak Authorization mechanism
910
* Local Encryption issues
1011
* Vulnerable Activity Components
@@ -30,6 +31,7 @@ This is a major update to one of my previous projects - "InsecureBank". This vul
3031

3132
Below are some of the other vulnerabilities that I am working on currently - and will be added as soon as I make sure that it does not break any of the other existing features:
3233
* Local SQL Injection
33-
* SMS based Denial-Of-Service
34+
* Intent based Denial-Of-Service - SMS
3435
* LockScreen Bypass
35-
36+
* Location Spoofing
37+
* Dead Code
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.gradle
2+
/local.properties
3+
/.idea/workspace.xml
4+
/.idea/libraries
5+
.DS_Store
6+
/build
7+
/captures

wip-attackercode/SniffIntents/.idea/.name

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wip-attackercode/SniffIntents/.idea/compiler.xml

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wip-attackercode/SniffIntents/.idea/copyright/profiles_settings.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)