Skip to content

Commit aae77fc

Browse files
committed
Land rapid7#9349, GoAhead LD_PRELOAD CGI Module
2 parents 9a35c32 + ece5528 commit aae77fc

File tree

71 files changed

+938
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+938
-1
lines changed

data/exploits/CVE-2017-17562/build.sh

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/bash
2+
3+
build () {
4+
CC=$1
5+
TARGET_SUFFIX=$2
6+
CFLAGS=$3
7+
8+
echo "[*] Building for ${TARGET_SUFFIX}..."
9+
for type in {shellcode,system,reverse,bind}
10+
do ${CC} ${CFLAGS} -Wall -fPIC -fno-stack-protector -Os goahead-cgi-${type}.c -s -shared -o goahead-cgi-${type}-${TARGET_SUFFIX}.so
11+
done
12+
}
13+
14+
rm -f *.o *.so *.gz
15+
16+
#
17+
# Linux GLIBC
18+
#
19+
20+
# x86
21+
build "gcc" "linux-glibc-x86_64" "-m64 -D OLD_LIB_SET_2"
22+
build "gcc" "linux-glibc-x86" "-m32 -D OLD_LIB_SET_1"
23+
24+
# ARM
25+
build "arm-linux-gnueabi-gcc-5" "linux-glibc-armel" "-march=armv5 -mlittle-endian"
26+
build "arm-linux-gnueabihf-gcc-5" "linux-glibc-armhf" "-march=armv7 -mlittle-endian"
27+
build "aarch64-linux-gnu-gcc-4.9" "linux-glibc-aarch64" ""
28+
29+
# MIPS
30+
build "mips-linux-gnu-gcc-5" "linux-glibc-mips" "-D OLD_LIB_SET_1"
31+
build "mipsel-linux-gnu-gcc-5" "linux-glibc-mipsel" "-D OLD_LIB_SET_1"
32+
build "mips64-linux-gnuabi64-gcc-5" "linux-glibc-mips64" "-D OLD_LIB_SET_1"
33+
build "mips64el-linux-gnuabi64-gcc-5" "linux-glibc-mips64el" "-D OLD_LIB_SET_1"
34+
35+
# SPARC
36+
build "sparc64-linux-gnu-gcc-5" "linux-glibc-sparc64" ""
37+
build "sparc64-linux-gnu-gcc-5" "linux-glibc-sparc" "-m32 -D OLD_LIB_SET_1"
38+
39+
# PowerPC
40+
build "powerpc-linux-gnu-gcc-5" "linux-glibc-powerpc" "-D OLD_LIB_SET_1"
41+
build "powerpc64-linux-gnu-gcc-5" "linux-glibc-powerpc64" ""
42+
build "powerpc64le-linux-gnu-gcc-4.9" "linux-glibc-powerpc64le" ""
43+
44+
# S390X
45+
build "s390x-linux-gnu-gcc-5" "linux-glibc-s390x" ""
46+
47+
gzip -9 *.so
48+
rm -f *.o *.so
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)