Giter Club home page Giter Club logo

memtools_vita's Introduction


Memtools Vita 0.3.2

Allows developers to play with the Vita's WebKit process memory by leveraging a WebKit vuln. Autoresolve is untested but should now handle kernel modules (patched syscalls) correctly.

Known issues: Does not dump the data section, only executable code. IDA does not like that, but its enough for ROP and some reversing. To dump the data section, manually add 4k increments (4k aligned) until crash. It probably will dump more than you need, but you will definitely have the data section (it is at higher addresses than module_info) Error handling does not account for ASLR. List of dumped modules needs to be serversided and SceWebKit (and the import tree) will have to be re-resolved every time it crashes

Install Capstone for python (disassembly library)

To use, first start the server:

    chmod a+x serv.py
    ./serv.py

Then with the Vita browse to http://<ipaddr>:8888. If all goes well you will see some output from the serv.py script. When you see %> it means that initialization is done. The supported commands are:

  • autodump : use to begin recursively resolving the modules
  • savemods : !unimplemented! save modules to disk (stored in "dump" folder and named as .bin)
  • x addr len : to display len bytes from addr in a hex-editor-like fashion
  • dis addr len mode : to disassemble len bytes from addr in mode (thumb or arm, latter is default)
  • dump addr len fname : to dump len bytes from addr to fname
  • ss begaddr endaddr pattern: to search for the string pattern in [begaddr, endaddr[
  • reload : to reload/reset everything
  • exit : to exit

Manually Dumping

Once you resolve a module and get module_info, you will need to look at the module_info to get stub_end. Dump from base of SceWebkit (sce_module.base) to stub end. The dump code appends to existing files with the same name, so delete the old ones if you are redumping for whatever reason. resolve.js implements the memory parsing for resolving a module, give it a look for help.


TODO

  • Implement : special-case handling for offsize import list entries

  • Implement : List of resolved modules serverside to prevent modules which are imported by more than one module from being dumped multiple times.


Contributors

  • CodeLion: PoC using bug with netcat backend, and this new composite of code below:
  • hgoel0974: contributions to above netcat streaming dump PoC
  • Josh_Axey: cleaner PoC using bug with python backend
  • Archaemic: even cleaner PoC using bug with even better python backend (and before everyone else)
  • "a good friend": major refactor combining all three PoCs and ground up replacement of python backend with far superior python backend

Github Contributers

  • MrNetrix : implemented reverse search and hex search
  • Aquynh : Changed install instructions for capstone and linked to project
  • PureIso: fixed directory existence check in dump code, added backup of old dumps and creation of new unique file if dump exists
  • TomTomdu80 : Added help output

Testers


Hints & Help

memtools_vita's People

Contributors

brianbtb avatar lottehime avatar pureiso avatar aquynh avatar majortomsec avatar

Stargazers

Desperado Security avatar Z3R0N3 avatar  avatar Cole Hudson avatar Minh-Triet Pham Tran avatar Hexxellor avatar Alisha Faye avatar drich avatar  avatar MISAWA Yoshihiro avatar  avatar  avatar  avatar Spectre avatar Timothy Shores avatar Hao Sun avatar Sunguk Lee avatar  avatar Sergi Granell・セルジ avatar

Watchers

Minh-Triet Pham Tran avatar  avatar  avatar Larson T. avatar Spectre avatar Corto Maltes avatar

memtools_vita's Issues

dump adds to end of file

If program is ran and a dump is present in the dump directory, it appends to end of previously dumped file.

Suggestion: have it skip if previous dump is found.

Unknown error resolving SceLibstdcxx

[+] Warning: Dbg error: {"dbg[message]": ["INDEX_SIZE_ERR: DOM Exception 1"], "dbg[TYPE_MISMATCH_ERR]": ["17"], "dbg[INVALID_NODE_TYPE_ERR]": ["24"], "dbg[code]": ["1"], "dbg[INVALID_ACCESS_ERR]": ["15"], "dbg[VALIDATION_ERR]": ["16"], "dbg[HIERARCHY_REQUEST_ERR]": ["3"], "dbg[stack]": ["@[native code]\nReadInt16FromAddr@http://192.168.1.8:8888/inc/resolve.js:233\nmodule_export_entry@http://192.168.1.8:8888/inc/resolve.js:69\nsce_module@http://192.168.1.8:8888/inc/resolve.js:180\ndo_resolve@http://192.168.1.8:8888/inc/shell.js:81\nshell@http://192.168.1.8:8888/inc/shell.js:204\nonload@http://192.168.1.8:8888/:16\n[native code]"], "dbg[URL_MISMATCH_ERR]": ["21"], "dbg[NOT_FOUND_ERR]": ["8"], "dbg[INUSE_ATTRIBUTE_ERR]": ["10"], "dbg[INVALID_MODIFICATION_ERR]": ["13"], "dbg[NAMESPACE_ERR]": ["14"], "dbg[INVALID_STATE_ERR]": ["11"], "dbg[SYNTAX_ERR]": ["12"], "dbg[DOMSTRING_SIZE_ERR]": ["2"], "dbg[line]": ["233"], "dbg[ABORT_ERR]": ["20"], "dbg[DATA_CLONE_ERR]": ["25"], "dbg[name]": ["INDEX_SIZE_ERR"], "dbg[NOT_SUPPORTED_ERR]": ["9"], "dbg[SECURITY_ERR]": ["18"], "dbg[QUOTA_EXCEEDED_ERR]": ["22"], "dbg[NO_DATA_ALLOWED_ERR]": ["6"], "dbg[WRONG_DOCUMENT_ERR]": ["4"], "dbg[INVALID_CHARACTER_ERR]": ["5"], "dbg[sourceURL]": ["http://192.168.1.8:8888/inc/resolve.js"], "dbg[TIMEOUT_ERR]": ["23"], "dbg[INDEX_SIZE_ERR]": ["1"], "dbg[NO_MODIFICATION_ALLOWED_ERR]": ["7"], "dbg[NETWORK_ERR]": ["19"]}

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.