epinna / tplmap

Server-Side Template Injection and Code Injection Detection and Exploitation Tool
GNU General Public License v3.0
3.75k stars 670 forks source link

the extension not working for me in Burp both in Kali and windows #31

Closed workfast108 closed 6 years ago

workfast108 commented 7 years ago

Hello Admin, Am facing issue while loading the burp extension, it is given Error, "no module name config_tab " i met all the requirement, i stall all the dependencies i am getting same error both in Kali and Windows with my Burp Pro. Kindly tell me what am doing wrong.

Regards

jx6f commented 7 years ago

Hello @workfast108 ,

Have you tried setup procedure of Jython-installer?

workfast108 commented 7 years ago

Hello Admin, Sorry for responding late, i actually tried everything, i follow to setup procedure as describe in your post, i even try to read through the comments of one user that initially find it difficult to use the extension, but my error response is different from that of the person. if i may ask , can the extension work with Burp suite Pro on Windows OS? can you please give me hits/ guideline on how to install it for Burp on Windows OS I will be waiting for your response. Warm Regards.

0xBeacon commented 7 years ago

Same issue here on Kali. Followed installation instructions exactly.

Traceback (most recent call last): File "/opt/BurpExtensions/tplmap/burp_extension/burp_extender.py", line 2, in <module> from config_tab import ConfigTab File "/opt/BurpExtensions/tplmap/burp_extension/config_tab.py", line 6, in <module> from core.checks import plugins ImportError: No module named core

jx6f commented 7 years ago

@workfast108 @thatchriseckert I found a typo in the "tplmap/burp_extension/README.md" . Could you try to load tplmap/burp_extension.py instead of tplmap/burp_extension/burp_extender.py?

jx6f commented 7 years ago

@workfast108 I hope that the extension will work with Burp Pro on Windows, but I haven't tried. I only tested that extension can be loaded with Burp Free on Windows7. If it works on your environment, could you report it?

workfast108 commented 7 years ago

Hello Admin, Firstly thank you for your time and response, regarding the issue at burp_tplmaperror tplmap

hand , am using windows 7 as well , and Burp Pro, I loaded "burp_extension.py" it is given the same error, below is the screenshot of error messages.

jx6f commented 7 years ago

@workfast108 Thank you for reporting details. The path of tplmap-master\burp_extention\burp_extension.py looks strange for me. Could you tell me the directory tree of tplmap?

workfast108 commented 7 years ago

Admin, The fact is no matter where i loaded burp_extension.py" from, it gives the same error message, what i mean is , even when i put it inside " core folder" or burp_extension folder or the original location of tplmaperror extraction

"burp_extension.py" after extracting from tplmap_master.zip, it still gives same issue. i will send you how screenshot of how the file are arrange after extraction. I will suggest you check the code from your side, or maybe one file is missing or not properly placed in the way you arrange it on github.

Warm Regards

jx6f commented 7 years ago

I believe codes on github are correct. Here are my screenshots.

virtualbox_win7_19_07_2017_17_07_03 virtualbox_win7_19_07_2017_17_07_55

The locations of burp_extension.py and others are very important. Please revert them.

jx6f commented 7 years ago

If you encounter the same error after revert, please tell me following informations.

workfast108 commented 7 years ago

pythonevni Admin, Thank you for your time and quick response, firstly from your screenshot i notice that you actually installed Jpython. but ordinarily must burp extension uses "Jython 2.7.0 - Standalone Jar " but in other to conform with your setting , i have decided to download and install Jython 2.7.0 - Installer, which i did Properly. I have also downloaded free version of Burpsuite v 1.7.24, erroronfreeversion jpythonpath

but i still haven't made any success regarding installation of your tool. , i have attached below, all my setting looks good, and i don't think my Burpsuite and Jpython should be in the same path before your extension can work? correct me if am wrong regarding this. waiting for your response.

Warm Regards

jx6f commented 7 years ago

Thank you for reporting.

The install paths of burp and jython, tplmap are irrelevant. Actually, these are separated in my environment.

Did the error message change? If it changed, please paste it.

workfast108 commented 7 years ago

Yes the Error message changes Admin, in Burp Pro, the Error message is different from the Error message in free Burp Version. let me paste it for you again. the first one am pasting is error messages for Pro version of Burp, and the send is for the Error messages of Free Burp1.7.24 version burp_tplmaperror

workfast108 commented 7 years ago

for the free version of Burp Suite 1.7.24 erroronfreeversion here is the Error message

0xBeacon commented 7 years ago

Loading tplmap/burp_extension.py instead of tplmap/burp_extension/burp_extender.py fixed the issue for me. Thanks, @jx6f

jx6f commented 7 years ago

@workfast108 That's good. Could you paste all error message of the free version of Burp Suite 1.7.24 here as text data?

jx6f commented 7 years ago

@thatchriseckert Thank you for reporting :+1:

workfast108 commented 7 years ago

well i feel like since @thatchriseckert said it has worked for him on Probably Kali, because the Error it pasted over here earlier is of Kali "Same issue here on Kali. Followed installation instructions exactly.

Traceback (most recent call last): File "/opt/BurpExtensions/tplmap/burp_extension/burp_extender.py", line 2, in from config_tab import ConfigTab File "/opt/BurpExtensions/tplmap/burp_extension/config_tab.py", line 6, in from core.checks import plugins ImportError: No module named core" i will go back to Kali and follow your earlier instruction of "Loading tplmap/burp_extension.py instead of tplmap/burp_extension/burp_extender.py" to see if it will work for me. Thank you for your time.

ArneSwinnen commented 7 years ago

Same issue here. I believe it has something to do with Jython. I tried both Standalone and Installed version of 2.7.0 but get the following error when attempting to load tplmap/burp_extension.py:

[Traceback] ImportError: No module named yaml

at org.python.core.Py.ImportError(Py.java:328) at org.python.core.imp.import_first(imp.java:877)

It appears that this is not included in standard jython. I'm testing on Mac OS X.

Thanks in advance,

Arne

jx6f commented 7 years ago

@ArneSwinnen Tplmap requires PyYaml and requests modules. If you didn't install them, see setup procedure of Jython-installer.

ArneSwinnen commented 7 years ago

Forgot to mention that: they are properly installed on my system. Seems like Jython simply doesn't take them into account when loading the plugin via Burp?

EDIT: Apologies, seems there was something wrong with my local Jython installation. Following the exact installation steps resolved my issue. Thanks!

jx6f commented 7 years ago

The module load path of CPython and Jython are different. You can check it by following command.

python2 -c 'from sys import path; print(path)'
java -jar /path/to/jython.jar -c 'from sys import path; print(path)'

I think that PyYaml module is not in the sys.path of your Jython. This link may help you: https://github.com/epinna/tplmap/issues/29#issuecomment-307091070

alexlauerman commented 6 years ago

I fixed the "No module named 'core'" error in Windows by setting my "Folder for loading additional modules" in Burp Extender Options to "C:\path\to\tplmap". This is not an ideal long term fix, but hopefully it will help someone, and also give some insight into using the right path to fix the issue.