Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WhatsApp Online Monitoring System

This system tracks when WhatsApp users are online and responsive by sending periodic reaction messages and measuring their response times (RTT). All data is stored in CSV format for analysis.

This project is based on the paper "Careless Whisper" (arXiv:2411.11194). See: https://arxiv.org/pdf/2411.11194 for the methodology and threat model that inspired the measurement approach used here.

Features

  • Config-driven monitoring: Define targets, intervals, and message IDs in config.json
  • RTT measurement: Tracks response time from message send to receipt confirmation
  • CSV storage: All response times and metadata saved as per-phone CSV files under the data/ folder (one file per target)
  • Online detection: Receipt times indicate when targets are online and active
  • Device state analysis: Response delays can indicate device state (connected, active, etc.)

Setup

1. Configure Targets

Edit config.json to set your monitoring targets:

{
  "messageID": "THISISJUSTCRAZY",
  "reaction": "👍",
  "intervalSeconds": 1,
  "targets": [
    {
      "phoneNumber": "10000000000",
      "enabled": true
    },
    {
      "phoneNumber": "10000000001",
      "enabled": true
    }
  ]
}

Configuration options:

  • messageID: The ID of the message to react to (use an existing message they received)
  • reaction: The emoji/reaction to send (can be any emoji)
  • intervalSeconds: How often to send reactions to each target (in seconds)
  • targets: Array of phone numbers to monitor
    • phoneNumber: Target's WhatsApp number (with country code, e.g., 919876543210)
    • enabled: Set to false to skip this target temporarily

2. Run the Program

go run main.go
  1. Scan the QR code with WhatsApp if you're not logged in
  2. Once logged in, select option 3 to start continuous monitoring
  3. The program will send reactions at the configured interval
  4. Responses are tracked and stored automatically

3. Monitor Response Data

Each phone number gets its own CSV file in the data/ folder: Each phone number gets its own CSV file in the data/ folder:

  • data/10000000000.csv — for phone number 10000000000
  • data/10000000001.csv — for phone number 10000000001
  • etc.

Each file contains:

Column Description
Timestamp When the receipt was received
MessageID ID of the reaction message sent
SendTime When the reaction was sent (local time)
ReceiptTime When we received the receipt (local time)
ResponseTimeMS Time between send and receipt in milliseconds
ReceiptType Type of receipt (delivered, read, inactive, etc.)

Analyzing the Data

Online detection:

  • If a target's CSV has entries → they are online/connected
  • Longer response times → device might be in low-power state, or network is slow
  • Missing entries → device offline or not responding

Response time patterns:

  • Consistent low RTT (< 1 second) → Active session, good connectivity
  • Variable RTT (0.5 - 3 seconds) → Normal mobile behavior
  • High RTT (> 5 seconds) → Slow network or device processing delay
  • No new entries → Device offline or blocked

Menu Options

=== WhatsApp Client Menu ===
1. Send text message          - Send a one-time message
2. Send reaction              - Send a one-time reaction
3. Start continuous monitoring - Begin automated monitoring (config-driven)
4. Stop monitoring            - Stop current monitoring session
5. Exit                       - Close application

CSV Data Format

Each phone number has its own file in the data/ folder. Sample output from data/10000000000.csv:

Timestamp,MessageID,SendTime,ReceiptTime,ResponseTimeMS,ReceiptType
2025-11-24T10:30:45Z,3EB0ABC123...,2025-11-24T10:30:42Z,2025-11-24T10:30:45Z,3200,inactive
2025-11-24T10:31:45Z,3EB0XYZ789...,2025-11-24T10:31:45Z,2025-11-24T10:31:46Z,1100,inactive
2025-11-24T10:32:45Z,3EB0XYZ789...,2025-11-24T10:32:45Z,2025-11-24T10:32:48Z,3400,inactive

Folder Structure

whatsapp-exploit/
├── config.json
├── main.go
├── data/
│   ├── 10000000000.csv
│   ├── 10000000001.csv
│   └── ...
└── whatsapp_session.db

Advanced Usage

Analyze Response Patterns

# Find targets that are responsive (aggregates from per-phone files under data/)
grep -h -v "^Timestamp" data/*.csv | cut -d',' -f2 | sed 's/@.*$//' | sort | uniq -c

# Check average response time per target (aggregates from data/*.csv)
awk -F',' 'FNR>1 {print $2, $5}' data/*.csv | awk '{sum[$1]+=$2; count[$1]++} END {for (target in sum) print target, sum[target]/count[target] "ms"}'

Change Interval Without Restarting

  1. Stop monitoring (option 4)
  2. Edit config.json to change intervalSeconds or add/remove targets
  3. Start monitoring again (option 3)

One-Time Message or Reaction

Use menu options 1 (text) or 2 (reaction) to send single messages without continuous monitoring.

Troubleshooting

"No response from target"

  • Target might be offline
  • Message ID might be invalid (needs to be a real message ID they received)
  • Your account might be blocked

"Not connected" warnings

  • WhatsApp session disconnected. Exit and restart the program to reconnect.

CSV file not updating

  • Check that monitoring is running (option 3 selected)
  • Verify receipt events are being received
  • Check that data/ folder exists and is writable
    • Each phone number gets its own file: data/10000000000.csv, etc.

Empty data files

  • Monitoring might not have been active long enough
  • Receipts might not be enabled for reactions
  • The message ID might not be valid

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages