Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.
Evan edited this page Jan 31, 2016 · 16 revisions

Ulterius API Overview

The Ulterius API is made to be as simple to use as possible, this software is in development so this document will change often, if you wish to contribute to improving this documentation feel free.

Sending API Request

API Request are made over websockets, when structing your socket message be sure your request looks similar to this

function sendCommand() {
    var packet = {
        endpoint: 'requestprocessinformation',
        apiKey: 'nbyOt83S6VTKWVwhaO4tF3GsbGavTQFz6Qi',
        syncKey: "anything" //will be returned exactly as sent, for request/response linking if you're into that
    }
    try {
        socket.send(JSON.stringify(packet));
    } catch (exception) {
        console.log(exception);
    }
}

Of course some API request require arguments, which can be sent as such

args is an array of any data type.

function sendCommand() {
    var packet = {
        endpoint: 'startprocess',
        apiKey: 'nbyOt83S6VTKWVwhaO4tF3GsbGavTQFz6Qi',
        args: ['explorer.exe'], //or an array for multiple arguments,
        syncKey: "anything"

    }
    try {
        socket.send(JSON.stringify(packet));
    } catch (exception) {
        console.log(exception);
    }
}

API Keys

API keys are mandatory for Ulterius due to the fact it provides access to remote machines.

If you have not set an API key in the settings file, one will be generated for you when you connect to the server the first time.

The JSON results will return as such

{"keyGenerated":true,"key":"TPg36sp0bY3jdMVlqmq0gOBIXZDtBkgk9SU"}

Available Endpoints

generatenewkey

Usage: Generates a new API key for the user Required Fields: key

{"keyGenerated":true,"key":"TPg36sp0bY3jdMVlqmq0gOBIXZDtBkgk9SU"}

generatenewkey

Usage: Generates a new API key for the user Required Fields: key

{"keyGenerated":true,"key":"TPg36sp0bY3jdMVlqmq0gOBIXZDtBkgk9SU"}

getactivewindowssnapshots

Usage: Get snapshots of all the open windows on the remote machine. Required Fields: key

windowTitle, base64Data

getwindowsdata

Usage: Returns data from the windows machine such as the Username and avatar. Required Fields: key

interface UserInfo {
    avatar: string,
    username: string
}
{"avatar":"base64String","username":"Andrew"}

verifypassword

Usage: Allows you to verify a windows password to a user provided string. Required Fields: key, args

{
  "validLogin": true,
  "message": "Login was successfull"
}

checkforupdate

Usage: Allows you to see if an update is available. And if so provides a link to that update. Required Fields: key

{
  "update": false,
  "message": "You have the latest version."
}

geteventlogs

Usage: Gets the event logs of a machine Required Fields: key

{
   "Application":[

   ],
   "Hardware Events":[

   ],
   "Internet Explorer":[

   ],
   "Key Management Service":[

   ],
   "PreEmptive":[

   ],
   "Security":[
      {
         "MachineName":"My-pc",
         "Data":[

         ],
         "Index":1525,
         "Category":"(104)",
         "CategoryNumber":104,
         "EventID":1102,
         "EntryType":8,
         "Message":"The audit log was cleared.\r\nSubject:\r\n\tSecurity ID:\tS-1-5-21-2223160591-1483291277-691628631-1001\r\n\tAccount Name:\tAndrew\r\n\tDomain Name:\tMY-PC\r\n\tLogon ID:\t0x431290",
         "Source":"Microsoft-Windows-Eventlog",
         "ReplacementStrings":[
            "S-1-5-21-2223160591-1483291277-691628631-1001",
        ....
      }
   ]
}

togglewebserver

Usage: Will enable or disable the built in webserver for hosting your interface on your servers machine. Send either true or false. Required Fields: key, args

{"statusUpdated":true,"useWebServer":"false"}

changewebserverport

Usage: Will change the port of the built in webserver, send the port number as your argument. Required Fields: key, args

{"statusUpdated":true,"useWebServer":"false"}

changewebfilepath

Usage: Will change where static web files are loaded from on your server, send the path as your argument. Required Fields: key, args

{"statusUpdated":true,"webFilePath":"D:/Documents/Visual Studio 2013/Projects/RemoteTaskServer/web/"}

changetaskserverport

Usage: This will change the default port of the Ulterius server, send the port as your argument. Required Fields: key, args

{"statusUpdated":true,"taskServerPort":"8387"}

changenetworkresolve

Usage: This will choose if when scanning networks, the server should resolve for a name, disabling speeds up the requestNetworkInformation call, send true or false as your argument. Required Fields: key, args

{"statusUpdated":true,"resolveNetworks":"true"}

getcurrentsettings

Usage: This will return all your current settings. Required Fields: key

{"UseWebServer":"false","WebServerPort":"9999","WebFilePath":"D:/Documents/Visual Studio 2013/Projects/RemoteTaskServer/web/","TaskServerPort":"8387","SkipHostNameResolve":"true"}

requestProcessInformation

Usage: This will return data similar to Task Manager such as process ram usage, processId, path, the process icon, etc. Required Fields: key

//returns an array of objects that look like this.
declare interface TaskInfo {
    id: number,
    path: string,
    icon: string,
    name: string,
    cpuUsage: number,
    ramUsage: number,
    threads: number,
    handles: number,
    ioWriteOperationsPerSec: number,
    ioReadOperationsPerSec: number
}
{"id":0,"path":"null","icon":"null","name":"_Total","cpuUsage":100,"ramUsage":3877462016,"threads":2428,"handles":91196,"ioWriteOperationsPerSec":191,"ioReadOperationsPerSec":5731}

requestCpuInformation

Usage: This will return all available data on your CPU. Required Fields: key

{"cpuName":"Intel® Core™ i5-4690K CPU @ 3.50GHz","id":"BFEBFBFF000306C3","socket":"SOCKET 0","description":"Intel64 Family 6 Model 60 Stepping 3","addressWidth":64,"dataWidth":64,"speedMhz":3501,"busSpeedMhz":100,"l2Cache":1048576,"l3Cache":6291456,"cores":4,"threads":4,"architecture":"x64"}

requestOsInformation

Usage: This will return all available data on your operating system. Required Fields: key

{"name":"Microsoft Windows 10 Home","version":"10.0.10586","maxProcessCount":4294967295,"maxProcessRam":137438953344,"architecture":"64-bit","serialNumber":"00326-10000-00000-AA722","build":"10586"}

requestNetworkInformation

Usage: This endpoint will return all of the available data of your network, as such. Be aware the first time this is called it will resolve IPs which is very slow, after that DNS results are cached. Disabling network resolving to speed this call up for its first run. If you do not it will resolve the host names of each device. It will cache them after. Required Fields: key

{"publicIp":"*****","networkDevices":[{"name":"My-pc","ip":"192.168.1.2","macAddress":"*"},{"name":"null","ip":"192.168.1.1","macAddress":"*"},{"name":"null","ip":"192.168.1.3","macAddress":"*"},{"name":"mediapc","ip":"192.168.1.8","macAddress":"*"},{"name":"null","ip":"192.168.45.254","macAddress":"*"},{"name":"null","ip":"192.168.218.254","macAddress":"*"}],"macAddress":"*","internalIp":"192.168.1.2"}

requestSystemInformation

Usage: This endpoint will return all of the available data of your system such as CPU/Disk/Memory usage, each cores usage is listed in order from 0 to maxCores. Required Fields: key

interface SystemInfo {
    cpuUsage: number[],
    cpuTemps: number[],
    totalMemory: number,
    availableMemory: number,
    usedMemory: number,
    runningProceses: number,
    upTime: number,
    runningAsAdmin: boolean,
    drives: DriveInfo[],
    motherBoard: string,
    cdRom: string,
    biosInfo: {
        biosManufacturer: string,
        biosSerial: string,
        biosCaption: string
    },
    networkInfo: {
        totalNetworkInterfaces: number,
        networkInterfaces: NetInterfaceInfo[],
        totalBytesReceived: number,
        totalBytesSent: number
    }
}

interface NetInterfaceInfo {
    Id: string,
    Name: string,
    Description: string,
    NetworkInterfaceType: number,
    OperationalStatus: number,
    Speed: number,
    IsReceiveOnly: boolean,
    SupportsMulticast: boolean
}
{"cpuUsage":[9.481993,6.41368246,6.30547667,0.09315314],"totalMemory":17126731776,"availableMemory":10091393024,"usedMemory":7035338752,"runningProceses":147,"upTime":294606218,"runningAsAdmin":true,"drives":[{"Name":"C:\\","TotalSize":119007080448,"FreeSpace":1019727872,"IsReady":true,"VolumeLabel":"","DriveFormat":"NTFS","DriveType":"Fixed","RootDirectory":"C:\\"},{"Name":"D:\\","TotalSize":1000202039296,"FreeSpace":269072261120,"IsReady":true,"VolumeLabel":"Storage","DriveFormat":"NTFS","DriveType":"Fixed","RootDirectory":"D:\\"}]}

startProcess

Usage: This endpoint will start a process on your remote machine. Your argument can either be a full path or something relative such as "explorer" Required Fields: key, args

{"processStarted":true}

killProcess

Usage: This endpoint kills a process on your remote machine via its process id, your argument is the processId. Required Fields: key, args

{"processStarted":true}
Clone this wiki locally