0% found this document useful (0 votes)
128 views

WebMonitor For Android - Documentation

Complete documentation for RevCode WebMonitor for Android client
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
128 views

WebMonitor For Android - Documentation

Complete documentation for RevCode WebMonitor for Android client
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 15

1

RevCode Client - > Establishing a secure connection to server


over SSL (443)

All packets sent from RevCode Android Client are mainly formatted using
JSON.

RevCode Android Client will try to establish a connection and then


continuously retrieve tasks from: recv_android.php, based on a returned
interval. See “Connection” for more information on this.

Note: Diffie-Hellman handshake authentication is required in order to


establish a valid connection. If client isn’t already authenticated, then
server is expected to reply with “-1”. See Handshake below.

Output packet structure for tasks:


All sent packets by the client are sent using HTTP Post.
All packets include the following variables (see exceptions on footnote 3):
 “t_id” – Task ID
 “key” – {CONFIG_KEY} refers to a configuration key generated by
a third party (the builder) and is extracted from the client
SETTINGS_DATA during runtime.
 “mode” – Task mode
 “uid” – {SYS_UID) Unique identifiable hardware ID obtained by
the client during runtime.
 “enc” – Encryption; 1=Encryption used, 0=Encryption not used
 “cmp” – Compression; 1=Compression used, 0=Compression not used

1. Note: If only encryption was used, then Base64 decoding must be


applied before decrypting values.
2. Decoding: If a combination of encryption and compression has
been used, then pseudo decoding would be: raw_value =
i. decompress(decrypt(Base64Decode(encoded_value)))
3. Note: Handshake (mode=”keyauth” and Connection (mode=connect”)
may not include all of the above listed variables.

Important: A task should be assumed to have failed whenever the


“v0” POST variable equals “0”.
2

Handshake:
Client will attempt a handshake by posting the following variables without
any encryption or compression:

key={CONFIG_KEY}
uid={SYS_UID)
mode=”keyauth”
data={BASE64(PUBLIC_KEY|UID|dP|dG|dPub)}

Important: Should the client ever receive “-1” during runtime, then
a new authentication (handshake) and connection should be
performed.

Encryption information:
Encryption algorithm used is AES-CBC without any IV.
Key size is 128 bits, as well as 128 bits block size.

Compression information:
Compression algorithm used is GZIP/Deflate.

Connection:
Client will proceed to establish a connection instantly upon a successful
handshake by posting the following variables:

key={CONFIG_KEY}
uid={SYS_UID}
enc={1 or 0, depending on client settings}
cmp={1 or 0, depending on client settings}
mode=”connect”
v0=LOCAL IP
v1=PHONE MODEL
v2=CONNECTION TYPE
v3=RADIO TYPE
v4=BATTERY LEVEL
v5=ANDROID VERSION
v6=NETWORK OPERATOR NAME
v7=IS ROOT/ADMIN
v8=IDLE TIME

 The interval for which the client will continuously query tasks
is based on the response of the POST above. A numeric value,
seconds, is expected.

Input packet structure for tasks:


All received tasks by the client need to be identified by their header
(mode) followed by necessary parameters.
The Client will attempt to split parameters by the delimiter “|”.
Incoming packet structure (string):
BASE64Encode(encrypt({MODE}|{TASK_STATUS}|{TASK_ID}|{Params[split by “|” if
several parameters are required]})).
For several tasks, client will split the available tasks by a new line as
delimiter and process each task consecutively.

Note: This scheme does not apply to responses from Handshake


(mode=”keyauth” and Connection (mode=connect”), but solely to when
client queries tasks (mode=”get_tasks”).

Performing tasks:
3

 Call logs: Listing of all call logs


o Input:
 Data header=”CALLS_LOGS_GET” (string)
 No parameters required
o Output:
 Data header: mode=”calls_logs_get”
 Data type: POST
 Variables: “v0” – Contains JSON array -> Columns:
 “contactName” - {Contact name (string)}
 “phoneNumber” – {Phone number (string)}
 “callType” – {Call type (string)}
 “callDate” – {Call date (string)}
 “callDuration” – {Call duration (string)}

 SMS logs: Listing of all SMS


o Input:
 Data header=”SMS_GET” (string)
 No parameters required
o Output:
 Data header: mode=”sms_get”
 Data type: POST
 Variables: “v0” – Contains JSON array -> Columns:
 “phonenumber” – {Phone number (string)}
 “mailbox” – {Mailbox (string)}
 “date” – {Date (string)}
 “status” – {Read/Unread (string)}
 “message” – {Message (string)}
4

 Location start: Obtain current GPS position


o Input:
 Data header=“LOCATION_GET” (string)
 No parameters required
o Output:
 Data header: mode=”location_get”
 Data type: POST
 Variables: POST with a range of variables
 “v0” – {Latitude - Latitude, in degrees
(double)}
 “v1” – {Longitude - Longitude, in degrees
(double)}
 “v2” – {Time - UTC time of this fix, in
milliseconds since January 1, 1970 (long)}
 “v3” – {Accuracy - Estimated horizontal
accuracy of this location, radial, in meters
(float)}
 “v4” – {Speed – Speed (if available), in
meters/second over ground (float)}
 “v5” – {Bearing - In degrees (float)}
 “v6” – {Altitude - In meters (float)}
 “v7” – {Heading – Preformatted heading
(string)}

 Notes: Client will wait until Android system GPS has


been enabled in order to obtain a GPS position.

 Location stop: Stop GPS position update


o Input:
 Data header=“LOCATION_STOP” (string)
 No parameters required
o Output:
 Data header: mode=”location_stop”
 Data type: POST
 Variables: POST with a range of variables
 “v0” – {Task status – 1=Success, 0=Failed
(int)}

 URL opener: Open a URL in default browser


o Input:
 Data header=“URL_OPEN” (string)
 Parameters:
 URL (string)
o Output:
 Data header: mode=”url_open”
 Data type: POST
 Variable: POST with a single variable (v0)
 “v0” – {Task status – 1=Success, 0=Failed
(int)}
5

 Device information: Obtain device information


o Input:
 Data header=“DEVICE_INFO” (string)
 No parameters required
o Output:
 Data header: mode=”device_info”
 Data type: POST
 Variable: “v0” - Contains JSON array -> Columns:
 “imei” – {IMEI number (string)}
 ”networkOperator” – {Returns the numeric name
(MCC+MNC) of current registered operator.
(string)}
 ”networkCountry” – {Returns the ISO country
code equivalent of the current registered
operator's MCC (Mobile Country Code) (string)}
 ”networkOperatorName” – { Returns the
alphabetic name of current registered operator
(string)}
 ”batteryLevel” – {Battery level including
percent-symbol (string)}
 ”phoneNumber” – { Returns the phone number
string for line 1, for example, the MSISDN for
a GSM phone (string)}
 ”radioType” – {Radio type ranging from GPRS to
4G (string)}
 ”conType” – {Returns a human-readable name
describing the type of the network, for
example "WIFI" or "MOBILE" (string)}
 ”deviceName” – {Returns manufacture followed
by device model (string)}
 ”localIP” – {Returns present local IP
(string)}
 ”wifiSSID” – {WiFi SSID – Only if connected
(string)}
 ”wifiIP” – {WiFi IP – Only if connected
(string)}
 ”appVersion” – {Application version (string)}
 ”androidSDKVersion” – {Android SDK Version
(string)}
 ”androidReleaseVersion” – {Android release
version (string)}
 ”deviceModel” – {Device model (string)}
 ”deviceBrand” – {Device brand (string)}
 ”deviceProduct” – {Device product (string)}
 ”deviceBuildID” – {Device Build ID (string)}
 ”deviceHost” – {Device host (string)}
 ”deviceSerial” – {Device serial number
(string)}
 ”deviceFingerprint” – {Device fingerprint data
– Only if present (string)}
 ”deviceHardware” – {Device hardware data
(string)}
 ”deviceType” – {Device type (string)}
 ”deviceUser” – {Device user (string)}
 ”deviceBootloader” – {Device bootloader data
(string)}
6

 ”hasRootAccess” – {Returns true/false,


depending on whether or not device has Root
access (string)}
 ”hddSizeTotal” – {Total size of internal
storage in bytes (double)}
 ”hddSizeFree” – {Free space of internal
storage in bytes (double)}
 ”SDMounted” – {Returns true/false, depending
on whether or not device has a mounted SD card
(string)}
 ”SDSizeFree” – {Free space of SD Card stored
in bytes (double)}
 ”SDSizeTotal” – {Total space of SD card in
bytes (double)}
 ”RAMTotal” – {Total space of RAM in bytes
(double)}
 ”RAMFree” – {Free space of RAM in bytes
(double)}
 ”CPUInfo” – {Information about CPU (string)}

 Contacts information: Obtain stored contacts and associated data


o Input:
 Data header=“CONTACTS_GET” (string)
 No parameters required
o Output:
 Data header: mode=”contacts_get”
 Data type: POST
 Variable: “v0” - Contains JSON array -> Columns:
 “name” – {Name (string)}
 “phonenumber[1..n]” – {Phone number(s)
(string)}
 “email[1..n]” – {Email(s) (string)}

 Sound recording: Records from microphone for n given seconds and


sends back binary of recording data
o Input:
 Data header=“SOUND_RECORD” (string)
 Parameters:
 DURATION_SECONDS (long)
o Output:
 Data header: mode=”sound_record”
 Data type: POST
 Variables: Single variable “data” containing binary
of a 3GPP media file
 “data” – {Base64 encoded binary data. Note:
See Output packet structure, section 2, if
decoding is needed - (string)}
7

 Sound recording stop: Stop sound recording


o Input:
 Data header=“SOUND_STOP” (string)
 No parameters required
o Output:
 Data header: mode=”sound_stop”

 Camera snapshot: Captures a snapshot from front or back camera


o Input:
 Data header=“CAM_SHOT” (string)
 Parameters:
 CAMERA_INDEX – {Index starting from the back-
facing camera on the device from 0 to N of
camera devices - (long)}
o Output:
 Data header: mode=”cam_shot”
 Data type: POST
 Variables: Single variable “data” containing binary
of a JPG image.
 “data” – {Base64 encoded binary data. Note:
See Output packet structure, section 2, if
decoding is needed - (string)}

 Gallery: Obtains resized versions (480P) of all stored images in


Gallery/Photos in chunks of 25 images per packet.
o Input:
 Data header=“GALLERY_GET” (string)
 Parameters:
 ARR_MD5 [OPTIONAL] – {String of MD5 checksums,
split by comma, “,”. This parameter is an
optional caching mechanism. Images having a
matched checksum will be excluded – (string)}
o Output:
 Data header: mode=”gallery_get”
 Data type: POST
 Variable: “v0” - Containing JSON array -> Columns:
 “name” – {File name - (string)}
 “f_size” – {Full image size - (long)}
 “t_size” – {Thumbnail size - (long)}
 “exif_model” – {Exif model - (string)}
 “exif_make” – {Exit make - (string)}
 “date” – {Date of creation - (string)}
 “md5” – {MD5 checksum, used - (string)}
 “data” – {Base64 encoded thumbnail binary data
- (string)}

 Variable: “v1” – {Status (“2” = buffering, “1” =


final packet) – (long)}
 Variable: “v2” – {Current chunk position – (long)}
 Variable: “v3” – {Total number of images – (long)}
8

 Gallery stop: Stop gallery progress


o Input:
 Data header=“GALLERY_STOP” (string)
 No parameters required
o Output:
 Data header: mode=”gallery_stop”
 Data type: POST
 Variables: POST with a range of variables
 “v0” – {Task status – 1=Success, 0=Failed
(int)}

 Installed applications: Obtain information about installed apps


o Input:
 Data header=“INSTALLED_APPS_GET” (string)
 No parameters required
o Output:
 Data header: mode=”installed_apps_get”
 Data type: POST
 Variable: “v0” - Contains JSON array -> Columns:
 “appName” – {Name (string)}
 “appPackageName” – {Package name (string)}
 “appPermissions” – {Permissions (string)}
 “appProcName” – {Process name (string)}
 “appVersion” – {Version (string)}
 “appInfo” – {Additional information (string)}
 “appIconData” – {Base64 encoded icon binary
data - (string)}

 Wi-Fi networks: Listing of all available Wi-Fi networks


o Input:
 Data header=“ WIFI_GET” (string)
 No parameters required
o Output:
 Data header: mode=”wifi_get”
 Data type: POST
 Variable: “v0” - Contains JSON array -> Columns:
 “ssid” – {SSID (string)}
 “bssid” – {MAC address of the wireless access
point (string)}
 “frequency” – {Frequency in GHZ (string)}
 “rssi” – {Received signal strength indicator
in dBm (string)}
 “capabilities” – {WiFi capabilities (string)}
9

 Clipboard: Obtain clipboard data


o Input:
 Data header=“CLIPBOARD_GET” (string)
 No parameters required
o Output:
 Data header: mode=”clipboard_get”
 Data type: POST
 Variable: “v0” - Contains JSON array -> Columns:
 “html” – {HTML formatted data (string)}
 “text” – {Raw data (string)}

 Files: Obtains a list of files from a given directory


o Input:
 Data header=“FILES_GET” (string)
 Parameters:
 Path – {Base64 encoded path. Use Base64(“0”)
in order to query root (string)}
o Output:
 Data header: mode=”files_get”
 Data type: POST
 Variable: “v0” - Containing JSON array -> Columns:
 “name” – {File name - (string)}
 “type” – {Item type: “d” or “f” - (string)}
 “size” – {Item size (“-1” for dir - (long)}
 “hidden” – {Item visibility, 1/0 - (long)}
 “l_mod” – {Last modified - (string)}

 File download: Downloads a given file


o Input:
 Data header=“FILE_DOWNLOAD” (string)
 Parameters:
 File path – {Base64 encoded file path}
o Output:
 Data header: mode=”file_download”
 Data type: POST
 Variables: Single variable “data” containing binary
of the target file
 “data” – {Base64 encoded binary data. Note:
See Output packet structure, section 2, if
decoding is needed - (string)}
10

 Notifications: Listing of all recorded notifications


o Input:
 Data header=”NOTIFICAITONS_GET” (string)
 No parameters required
o Output:
 Data header: mode=”notifications_get”
 Data type: POST
 Variables: “v0” – Contains JSON array -> Columns:
 “app” - {Application name (string)}
 “title” – {Base64 encoded title (string)}
 “text” – {Base64 encoded text (string)}
 “time” – {Preformatted timestamp (string)}

 Recorded calls: Listing of all recorded calls


o Input:
 Data header=”CALLS_RECORDS_INFO_GET” (string)
 No parameters required
o Output:
 Data header: mode=”calls_records_info_get”
 Data type: POST
 Variables: “v0” – Contains JSON array -> Columns:
 “number” - {Phone number (string)}
 “contact” – {Contact name (string)}
 “type” – {Incoming/Outgoing call (string)}
 “date” – {UNIX timestamp (string)}
 “size” – {Preformatted size (string)}
 “path” – {Path to clip for DL (string)}

 File upload: Listing of all recorded calls


o Input:
 Data header=”FILE_UPLOAD” (string)
 Base64 encoded full local save path – {string}
 Base64 encoded URL to file – {string}
o Output:
 Data header: mode=”file_upload”
 Data type: POST
 Variable: POST with a single variable (v0)
 “v0” – {Task status – 1=Success, 0=Failed
(int)}
11

 File delete: Deletes a specific file or directory


o Input:
 Data header=”FILE_DELETE” (string)
 Base64 encoded path to file or directory –
{string}
o Output:
 Data header: mode=”file_delete”
 Data type: POST
 Variable: POST with a single variable (v0)
 “v0” – {Task status – 1=Success, 0=Failed
(int)}

 Magnetic field start: Obtain current magnetic field around


device
o Input:
 Data header=“MAGNETIC_FIELD_GET” (string)
 No parameters required
o Output:
 Data header: mode=”magnetic_field_get”
 Data type: POST
 Variables: POST with a range of variables
 “v0” – {X – Vector variable (float)}
 “v1” – {Y - Vector variable (float)}
 “v2” – {Z - Vector variable (float)}

 Magnetic field stop: Stop magnetic field update


o Input:
 Data header=“LOCATION_STOP” (string)
 No parameters required
o Output:
 Data header: mode=”magnetic_field_stop”
 Data type: POST
 Variables: POST with a range of variables
 “v0” – {Task status – 1=Success, 0=Failed
(int)}
12

 Numbers block get: List all blocked phone numbers


o Input:
 Data header=“NUMBERS_BLOCK_GET” (string)
 No parameters required
o Output:
 Data header: mode=”numbers_block_get”
 Data type: POST
 Variables: “v0” – Contains JSON array -> Columns:
 “number” - {Blocked phone number (string)}

 Numbers block add: Add single or range of numbers to be blocked


o Input:
 Data header=“NUMBERS_BLOCK_ADD” (string)
 Parameters:
 Numbers – {String of numbers to be blocked,
split by comma, “,”. – (string)}
o Output:
 Data header: mode=”numbers_block_add”
 Data type: POST
 Variables: POST with a range of variables
 “v0” – {Task status – 1=Success, 0=Failed
(int)}

 Numbers block delete: Unblock single or range of numbers


o Input:
 Data header=“NUMBERS_BLOCK_DEL” (string)
 Parameters:
 Numbers – {String of numbers to be unblocked,
split by comma, “,”. – (string)}
o Output:
 Data header: mode=”numbers_block_del”
 Data type: POST
 Variables: POST with a range of variables
 “v0” – {Task status – 1=Success, 0=Failed
(int)}

 Numbers block clear: Clear full block list


o Input:
 Data header=“NUMBERS_BLOCK_CLEAR” (string)
 No parameters required
o Output:
 Data header: mode=”numbers_block_clear”
 Data type: POST
 Variables: POST with a range of variables
 “v0” – {Task status – 1=Success, 0=Failed
(int)}
13

 Vibrate: Triggers the device vibrator


o Input:
 Data header=“VIBRATE” (string)
 Parameters:
 DURATION_SECONDS (long)
o Output:
 Data header: mode=”vibrate”
 Data type: POST
 Variables: POST with a range of variables
 “v0” – {Task status – 1=Success, 0=Failed
(int)}

 Toast: Create a Toast (a transparent popup).


o Input:
 Data header=”TOAST_MAKE” (string)
 Parameters:
 MESSAGE (string)
o Output:
 Data header: mode=”toast_make”
 Data type: POST
 Variables: POST with a range of variables
 “v0” – {Task status – 1=Success, 0=Failed
(int)}

 Browser history: Listing of presorted native browser history.


Note: Only compatible with Android version up to 5.1 (API 22).
o Input:
 Data header=”BROWSER_HISTORY_GET” (string)
 No parameters required
o Output:
 Data header: mode=”browser_history_get”
 Data type: POST
 Variables: “v0” – Contains JSON array -> Columns:
 “url” - {Page URL (string)}
 “title” – {Page title (string)}
14

 Screen shot: Records from microphone for n given seconds and


sends back binary of recording data.
Note: Requires a rooted version of Android.
o Input:
 Data header=“ROOT_SCREEN_SHOT” (string)
 No parameters required
o Output:
 Data header: mode=”root_screen_shot”
 Data type: POST
 Variables: Single variable “data” containing binary
of a PNG media file
 “data” – {Base64 encoded binary data. Note:
See Output packet structure, section 2, if
decoding is needed - (string)}

 Make call: Prepares a phone call to a given number.


o Input:
 Data header=”CALL_MAKE” (string)
 No parameters required
o Output:
 Data header: mode=”call_make”
 Data type: POST
 Variables: POST with a range of variables
 “v0” – {Task status – 1=Success, 0=Failed
(int)}

 SMS Send: Send a SMS to a given number.


o Input:
 Data header=”SMS_SEND” (string)
 Parameters:
 Base64 PHONE_NUMBER (string)
o Output:
 Data header: mode=”sms_send”
 Data type: POST
 Variables: POST with a range of variables
 “v0” – {Task status – 1=Success, 0=Failed
(int)}
15

 Text to voice: Speaks a given message.


o Input:
 Data header=”TEXT_SPEAK” (string)
 Parameters:
 Base64 MESSAGE (string)
o Output:
 Data header: mode=”text_speak”
 Data type: POST
 Variables: POST with a range of variables
 “v0” – {Task status – 1=Success, 0=Failed
(int)}

You might also like