nvssks / Android-Responder

Scripts for running Responder.py in an Android (rooted) device.
59 stars 22 forks source link

Android 5.0 "error: only position independent executables (PIE) are supported." #1

Closed wikijm closed 7 years ago

wikijm commented 8 years ago

PIE is a useful security feature, as randomizing the address space makes it significantly more difficult for an attacker to exploit bugs in a program.

I get this error after:

Starting Responder.py, Ctrl-C to exit

nvssks commented 8 years ago

can you give me the output of these commands: pm list packages qpython getprop ro.build.version.release

Seems like the check I have for the version is not working. qPython has a different script (with no PIE) for android >5

wikijm commented 8 years ago

pm list packages qpython

package:org.qpython.qpy3

getprop ro.build.version.release

5.0

nvssks commented 8 years ago

You're using qPython3, I haven't tested Responder with Python version 3.

Quick solution would be to install qPython for Python 2.7 (until I test and update the code)

wikijm commented 8 years ago

Thanks for your quick answer. Same issue on QPython.

pm list packages qpython

package:org.qpython.qpy package:org.qpython.qpy3

getprop ro.build.version.release

5.0

3ntr0phy commented 8 years ago

I have this issue: only PIE are supported. How do you run the script?

pm list packages qpython

package:org.qpython.qpy

getprop ro.build.version.release

6.0
nvssks commented 8 years ago

could you try running: su -c sh /data/data/org.qpython.qpy/files/bin/qpython-android5.sh and su -c sh /data/data/org.qpython.qpy/files/bin/qpython.sh

One of each should give the same error or a Python interpreter. Seems that the version of android is not adequate for this check

3ntr0phy commented 8 years ago

It doesn't produce any error and does not open a python interpreter, it just produce me this: 127| Nothing changes. :/

3ntr0phy commented 8 years ago

Which Android version did you use for testing it?

nvssks commented 8 years ago

I'm testing it on Android 6.0.1 and I had tested it on 4.7 as well.

Can you open qPython from the icon and select console? The first line should be one of the above

3ntr0phy commented 8 years ago

Yes but the first line is /data/user/0/org.qpython.qpy, not /data/data/org.qpython.qpy/. Moreover i get the python interpreter if i remove the -c from the command : su sh /data/user/0/....

nvssks commented 8 years ago

Pushed a new commit in https://github.com/nvssks/Android-Responder/tree/dev-1 It will try with the PIE/non-PIE version of qPython's script if the first fails

Could you please test this version and let me know if it works

@Jacoppy try running the script with su sh $DIR/startTether.sh and see if that works

wikijm commented 8 years ago

Result with the new commit: screenshot_2016-10-25-08-23-22

nvssks commented 8 years ago

I think I had a small error in the script :/ - (updated in dev-1)

Can you open qPython, go to console and post a screenshot?

wikijm commented 8 years ago

screenshot_2016-10-25-12-04-40 1

nvssks commented 8 years ago

I think I have fixed it in the latest update in dev-1

Otherwise if this still doesn't work, let the script fail and try to run Responder manually: su -c sh /data/data/org.qpython.qpy/files/bin/qpython-android5.sh ./Responder/Responder.py -I rndis0 -f -w -r -d -F or su -c sh /data/data/org.qpython.qpy/files/bin/qpython-android5.sh ./Responder/Responder.py -I usb0 -f -w -r -d -F

Not sure which interface Android 5.0 uses (usb0 or rndis0)

wikijm commented 7 years ago

It seems to work like a charm. Thanks a lot :-)

OZZ-MAN commented 6 years ago

Why would I be getting a Lolipop error in Nouget? I was having the understanding that "pie" was an Android 5 issue.