Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ndk-build: command not found #6

Open
ghost opened this issue Aug 12, 2017 · 5 comments
Open

ndk-build: command not found #6

ghost opened this issue Aug 12, 2017 · 5 comments

Comments

@ghost
Copy link

ghost commented Aug 12, 2017

Hello,

I am having this ndk issue when running the command "make"
ndk-buildmake: ndk-build: command not foundmakefile:35: recipe for target 'all' failedmake: *** [all] error 127

@sudhackar
Copy link

You need NDK (Native Develop Toolkit) in your $PATH so that ndk-build is available. Look up how to setup ndk for your machine and then build the jni challenge.

@ghost
Copy link
Author

ghost commented Aug 15, 2017

I've done setting up the PATH and now i have this
screenshot from 2017-08-15 17-51-01

@sudhackar
Copy link

Challenge 13 has been made such to get code execution with the strcpy buffer overflow. To make it easy we did

LOCAL_DISABLE_NO_EXECUTE := true

in app/src/main/jni/Android.mk. I think in default setting clang is the compiler for ndk and its broken probably for this flag. So if you're not hell bent on getting RCE from shellcode, you can turn this flag to false and it'll compile.

@sudhackar
Copy link

Other option is to switch to GCC altogether. From /toolchains in your ndk path find out your GCC version and add the following in app/src/main/jni/Application.mk

NDK_TOOLCHAIN_VERSION=<gcc-version>

This will disable NX in jni libs.

@sudhackar sudhackar mentioned this issue Aug 21, 2017
@z3dc0ps
Copy link

z3dc0ps commented Apr 24, 2022

watch this video to clear all doubts: https://www.youtube.com/watch?v=PXvEh_QhGt8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants