GithubHelp home page GithubHelp logo

wp81elevation's Introduction

wp81Elevation

Install a little web server running as a service on a Windows Phone 8.1

Features

Currently, only 4 actions are possible (note: the phone IP address is displayed by the application) :

  • Get the status of the service
GET http://<phone IP address>:7171/status

Returns HTTP 200 and {"status":"OK"} when the service is running.

  • Execute a program
POST http://<phone IP address>:7171/execute
body: 
{
  "command":"<path to an executable file and its parameters>",
  (optional)"resultType":"(default)TEXT|JSON"
}

The program is executed by user system with high integrity and all privileges enabled.
This action waits the end of the execution before returning.
And the response contains the console output of the executed program.
Example of usage: {"command":"C:\windows\system32\WPR.EXE -status"}
By default the result of the exe is assumed to be of type TEXT, but if the result is already of type JSON you can add the optional property resultType=JSON.

  • Download a file
GET http://<phone IP address>:7171/download?path=<path to a file>

Example of usage: http://192.168.1.28:7171/download?path=C:\Data\USERS\Public\Documents\wp81service.log

  • Stop the service
GET or POST http://<phone IP address>:7171/stopService

Could be useful to update the .exe of the service.

Miscellaneous

The service writes all its logs into C:\Data\USERS\Public\Documents\wp81service.log.

The service also writes OutputDebugString information coming from other processes into this log file: C:\Data\USERS\Public\Documents\wp81service_debug.log

All log files are overriden when the service starts.

In order to authorize a .exe to be executed by user system, the .exe must be added to the value Executables of the key SOFTWARE\Microsoft\SecurityManager\PrincipalClasses\PRINCIPAL_CLASS_TCB of the registry hive HKEY_LOCAL_MACHINE.

Compilation requires Visual Studio 2015 with Windows Phone 8.1 support.

Execution requires a Windows Phone 8.1 rooted with WPinternals.

Included programs

  • WP81LISTPROCESS.EXE <no parameter>
    List all the running processes with a list of their privileges.
    The result is a JSON.

  • WP81LISTOBJECT.EXE <directory>
    List the objects contained in a directory of the Object Manager.

Examples of usages:

curl -v http://192.168.1.18:7171/execute -d "{\"command\":\"C:\\windows\\system32\\WP81LISTOBJECT.EXE \\Device\"}"  
curl -v http://192.168.1.18:7171/execute -d "{\"command\":\"C:\\windows\\system32\\WP81LISTOBJECT.EXE \\Driver\"}"  
curl -v http://192.168.1.18:7171/execute -d "{\"command\":\"C:\\windows\\system32\\WP81LISTOBJECT.EXE \\GLOBAL??\"}"  
  • WP81LISTDEVNODE.EXE <no parameter>
    List the device instances that are currently present on the system.

  • WP81SERVICECTRL.EXE <command>
    List the driver services. Can also stop a driver service.

Examples of usages:

curl -v http://192.168.1.18:7171/execute -d "{\"command\":\"C:\\windows\\system32\\WP81SERVICECTRL.EXE list\"}"  
curl -v http://192.168.1.18:7171/execute -d "{\"command\":\"C:\\windows\\system32\\WP81SERVICECTRL.EXE stop wp81debuglogger\"}"  

How to add a file into a .apx and build the package.

add item

exclude from build

create package

don't upload to store

configuration

Credits

JSON read/write

System token creation

Winsock2 server

DLL import

wp81elevation's People

Contributors

fredericgette avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.