nccgroup / blackboxprotobuf

Blackbox Protobuf is a set of tools for working with encoded Protocol Buffers (protobuf) without the matching protobuf definition.
MIT License
480 stars 82 forks source link

An error occurred while loading extender.py in burp #26

Closed TheSR007 closed 8 months ago

TheSR007 commented 8 months ago

the output is empty, but shows these following errors , I have used another protobuf python extension in burp using jython and that didn't had editing feature so I tried this one and this error occurred, any idea why?

Note: git submodule update --init wasn't working, it was stuck when I ran it so I downloaded them manually and put them in burp/deps

    at org.python.core.imp.importName(imp.java:1544)
at org.python.core.ImportFunction.__call__(__builtin__.java:1285)
at org.python.core.PyObject.__call__(PyObject.java:433)
at org.python.core.__builtin__.__import__(__builtin__.java:1232)
at org.python.core.imp.importFromAs(imp.java:1636)
at org.python.core.imp.importFrom(imp.java:1611)
at google.protobuf.internal.wire_format$py.f$0(C:/D/modding/Tools/Burpsuite/blackboxprotobuf/burp/deps/protobuf/python/google/protobuf/internal/wire_format.py:236)
at google.protobuf.internal.wire_format$py.call_function(C:/D/modding/Tools/Burpsuite/blackboxprotobuf/burp/deps/protobuf/python/google/protobuf/internal/wire_format.py)
at org.python.core.PyTableCode.call(PyTableCode.java:173)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:632)
at org.python.core.imp.createFromSource(imp.java:585)
at org.python.core.imp.loadFromSource(imp.java:946)
at org.python.core.imp.find_module(imp.java:771)
at org.python.core.PyModule.findSubModule(PyModule.java:140)
at org.python.core.PyModule.impAttr(PyModule.java:107)
at org.python.core.imp.import_next(imp.java:1163)
at org.python.core.imp.ensureFromList(imp.java:1502)
at org.python.core.imp.ensureFromList(imp.java:1465)
at org.python.core.imp.import_module_level(imp.java:1379)
at org.python.core.imp.importName(imp.java:1544)
at org.python.core.ImportFunction.__call__(__builtin__.java:1285)
at org.python.core.PyObject.__call__(PyObject.java:433)
at org.python.core.__builtin__.__import__(__builtin__.java:1232)
at org.python.core.imp.importFromAs(imp.java:1636)
at org.python.core.imp.importFrom(imp.java:1611)
at blackboxprotobuf.lib.types.type_maps$py.f$0(C:/D/modding/Tools/Burpsuite/blackboxprotobuf/lib/blackboxprotobuf/lib/types/type_maps.py:106)
at blackboxprotobuf.lib.types.type_maps$py.call_function(C:/D/modding/Tools/Burpsuite/blackboxprotobuf/lib/blackboxprotobuf/lib/types/type_maps.py)
at org.python.core.PyTableCode.call(PyTableCode.java:173)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:632)
at org.python.core.imp.createFromPyClass(imp.java:314)
at org.python.core.imp.createFromPyClass(imp.java:257)
at org.python.core.imp.loadFromSource(imp.java:931)
at org.python.core.imp.find_module(imp.java:771)
at org.python.core.PyModule.findSubModule(PyModule.java:140)
at org.python.core.PyModule.impAttr(PyModule.java:107)
at org.python.core.imp.import_next(imp.java:1163)
at org.python.core.imp.import_module_level(imp.java:1352)
at org.python.core.imp.importName(imp.java:1544)
at org.python.core.ImportFunction.__call__(__builtin__.java:1285)
at org.python.core.PyObject.__call__(PyObject.java:433)
at org.python.core.__builtin__.__import__(__builtin__.java:1232)
at org.python.core.imp.importAll(imp.java:1663)
at blackboxprotobuf.lib.types$py.f$0(C:/D/modding/Tools/Burpsuite/blackboxprotobuf/lib/blackboxprotobuf/lib/types/__init__.py:27)
at blackboxprotobuf.lib.types$py.call_function(C:/D/modding/Tools/Burpsuite/blackboxprotobuf/lib/blackboxprotobuf/lib/types/__init__.py)
at org.python.core.PyTableCode.call(PyTableCode.java:173)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:632)
at org.python.core.imp.createFromPyClass(imp.java:314)
at org.python.core.imp.createFromPyClass(imp.java:257)
at org.python.core.imp.loadFromSource(imp.java:931)
at org.python.core.imp.find_module(imp.java:771)
at org.python.core.PyModule.findSubModule(PyModule.java:140)
at org.python.core.PyModule.impAttr(PyModule.java:107)
at org.python.core.imp.import_next(imp.java:1163)
at org.python.core.imp.import_logic(imp.java:1280)
at org.python.core.imp.import_module_level(imp.java:1371)
at org.python.core.imp.importName(imp.java:1544)
at org.python.core.ImportFunction.__call__(__builtin__.java:1285)
at org.python.core.PyObject.__call__(PyObject.java:433)
at org.python.core.__builtin__.__import__(__builtin__.java:1232)
at org.python.core.imp.importOne(imp.java:1563)
at blackboxprotobuf.lib.api$py.f$0(C:/D/modding/Tools/Burpsuite/blackboxprotobuf/lib/blackboxprotobuf/lib/api.py:646)
at blackboxprotobuf.lib.api$py.call_function(C:/D/modding/Tools/Burpsuite/blackboxprotobuf/lib/blackboxprotobuf/lib/api.py)
at org.python.core.PyTableCode.call(PyTableCode.java:173)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:632)
at org.python.core.imp.createFromPyClass(imp.java:314)
at org.python.core.imp.createFromPyClass(imp.java:257)
at org.python.core.imp.loadFromSource(imp.java:931)
at org.python.core.imp.find_module(imp.java:771)
at org.python.core.PyModule.findSubModule(PyModule.java:140)
at org.python.core.PyModule.impAttr(PyModule.java:107)
at org.python.core.imp.import_next(imp.java:1163)
at org.python.core.imp.import_module_level(imp.java:1352)
at org.python.core.imp.importName(imp.java:1544)
at org.python.core.ImportFunction.__call__(__builtin__.java:1285)
at org.python.core.PyObject.__call__(PyObject.java:433)
at org.python.core.__builtin__.__import__(__builtin__.java:1232)
at org.python.core.imp.importAll(imp.java:1663)
at blackboxprotobuf.lib$py.f$0(C:/D/modding/Tools/Burpsuite/blackboxprotobuf/lib/blackboxprotobuf/lib/__init__.py:28)
at blackboxprotobuf.lib$py.call_function(C:/D/modding/Tools/Burpsuite/blackboxprotobuf/lib/blackboxprotobuf/lib/__init__.py)
at org.python.core.PyTableCode.call(PyTableCode.java:173)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:632)
at org.python.core.imp.createFromPyClass(imp.java:314)
at org.python.core.imp.createFromPyClass(imp.java:257)
at org.python.core.imp.loadFromSource(imp.java:931)
at org.python.core.imp.find_module(imp.java:771)
at org.python.core.PyModule.findSubModule(PyModule.java:140)
at org.python.core.PyModule.impAttr(PyModule.java:107)
at org.python.core.imp.import_next(imp.java:1163)
at org.python.core.imp.import_logic(imp.java:1280)
at org.python.core.imp.import_module_level(imp.java:1371)
at org.python.core.imp.importName(imp.java:1544)
at org.python.core.ImportFunction.__call__(__builtin__.java:1285)
at org.python.core.PyObject.__call__(PyObject.java:433)
at org.python.core.__builtin__.__import__(__builtin__.java:1232)
at org.python.core.imp.importAll(imp.java:1663)
at blackboxprotobuf$py.f$0(C:/D/modding/Tools/Burpsuite/blackboxprotobuf/burp/blackboxprotobuf/__init__.py:59)
at blackboxprotobuf$py.call_function(C:/D/modding/Tools/Burpsuite/blackboxprotobuf/burp/blackboxprotobuf/__init__.py)
at org.python.core.PyTableCode.call(PyTableCode.java:173)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.imp.createFromCode(imp.java:632)
at org.python.core.imp.createFromPyClass(imp.java:314)
at org.python.core.imp.createFromPyClass(imp.java:257)
at org.python.core.imp.loadFromSource(imp.java:931)
at org.python.core.imp.find_module(imp.java:771)
at org.python.core.imp.import_next(imp.java:1160)
at org.python.core.imp.import_module_level(imp.java:1352)
at org.python.core.imp.importName(imp.java:1544)
at org.python.core.ImportFunction.__call__(__builtin__.java:1285)
at org.python.core.PyObject.__call__(PyObject.java:433)
at org.python.core.__builtin__.__import__(__builtin__.java:1232)
at org.python.core.imp.importOne(imp.java:1563)
at org.python.pycode._pyx4.f$0(C:/D/modding/Tools/Burpsuite/blackboxprotobuf/burp/blackboxprotobuf/burp/extender.py:48)
at org.python.pycode._pyx4.call_function(C:/D/modding/Tools/Burpsuite/blackboxprotobuf/burp/blackboxprotobuf/burp/extender.py)
at org.python.core.PyTableCode.call(PyTableCode.java:173)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1703)
at org.python.core.__builtin__.execfile_flags(__builtin__.java:535)
at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:287)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at burp.Zfs5.Zt(Unknown Source)
at burp.Zosf.Zb(Unknown Source)
at burp.Z_l.ZE(Unknown Source)
at burp.Zq1k.lambda$panelLoaded$0(Unknown Source)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1623)
rwinkelmaier-ncc commented 8 months ago

I just double checked with a clean install and didn't run into any issues and Burp's error messages unfortunately do not offer much information.

Only ideas that come to mind would be to double check the version on protobufdependency, the submodule is tied to a specific commit. You could also maybe retry the submodule clone; I'm not sure what that didn't go through.

Only other variable might be the the burp version or maybe Jython version, but I'd check the dependencies first.

TheSR007 commented 8 months ago

burp version is 10.3.2 latest jython-standalone-2.7.3.jar latest image it has just stucked there, but I will try again now with specific commit

TheSR007 commented 8 months ago

I double checked the dependencies but it still won't load in burp, I guess something is wrong with my system. Thanks for your effort, I am closing the issue

rwinkelmaier-ncc commented 7 months ago

Hey, I know it's been awhile, but wanted to test this real quick on my system. If I use git clone for both protobuf and six instead of using git submodule, I think I'm getting the same error as you in Burp.

If I go into the burp/deps/protobuf folder and run git checkout 909a0f3, then the extension is able to load in Burp. Not sure if that's the exact issue you had, but worth trying if you need to use the tool again.

I'm also hoping to release a new version soon that drops the protobuf dependency, so that will probably make it moot as well.

TheSR007 commented 7 months ago

Thanks, that worked. Apparently it's something to do with the latest version of protobuf, git checkout 909a0f3 fixed it, hope you will fix it in the next version

rwinkelmaier-ncc commented 7 months ago

The protobuf library dropped support for python2 awhile back and Burp extensions can only be python2 (technically Jython2). The protobuf submodule in the deps directory points towards a specific commit before support was dropped.