-
Notifications
You must be signed in to change notification settings - Fork 43
/
Makefile
134 lines (91 loc) · 3.98 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
all: x86_64 x86 test2_dup test2 test whoami whoami32 tasklist tasklist32 cat cat32 uname uname32 id id32 uname uname32 walk walk32 grep grep32 find find32 chmod chmod32 env env32 pwd pwd32 ifconfig ifconfig32
SOURCES:=./src/beacon_compatibility.c ./src/ELFLoader.c
x86_64:
gcc -Wall -I ./includes/ -DTESTING_MAIN $(SOURCES) -ldl -o ELFLoader.out
x86_64D:
gcc -g -DDEBUG -Wall -I ./includes/ -DTESTING_MAIN $(SOURCES) -ldl -o ELFLoaderD.out
x86_64so:
gcc -shared -fPIC -fvisibility=hidden -DLIBRARY -Wall -I ./includes/ -DTESTING_MAIN $(SOURCES) -ldl -o libELFLoader.so
x86_64runner:
gcc -I ./includes/ runner.c -o runner.out -L . -lELFLoader
x86_64_bsd:
gcc -Wall -I ./includes/ -DTESTING_MAIN $(SOURCES) -o ELFLoader_bsd.out
x86_64_bsdD:
gcc -Wall -I ./includes/ -DDEBUG -DTESTING_MAIN $(SOURCES) -o ELFLoader_bsd.out
win64:
x86_64-w64-mingw32-gcc -I ./includes/ -DTESTING_MAIN $(SOURCES) -o ELFLoader_win64.exe
win64D:
x86_64-w64-mingw32-gcc -DDEBUG -I ./includes/ -DTESTING_MAIN $(SOURCES) -o ELFLoaderD_win64.exe
win32:
i686-w64-mingw32-gcc -I ./includes/ -DTESTING_MAIN $(SOURCES) -o ELFLoader_win32.exe
win32D:
i686-w64-mingw32-gcc -DDEBUG -I ./includes/ -DTESTING_MAIN $(SOURCES) -o ELFLoaderD_win32.exe
test2_dup:
gcc -c -fPIC -I ./includes/ testobjects/test2_duplicatetext.c -o testobjects/test2_duplicatetext.o
test2:
gcc -c -fPIC -I ./includes/ testobjects/test2.c -o testobjects/test2.o
test:
gcc -c -fPIC -I ./includes/ testobjects/test.c -o testobjects/test.o
x86:
gcc -m32 -I ./includes/ -DTESTING_MAIN $(SOURCES) -ldl -o ELFLoader32.out
x86D:
gcc -m32 -DDEBUG -I ./includes/ -DTESTING_MAIN $(SOURCES) -ldl -o ELFLoader32.out
# Example of compiling object files for 32 bit x86 architecture.
test32:
gcc -m32 -c -fno-stack-protector -fno-pie ./testobjects/test.c -o ./testobjects/test32.o
whoami:
gcc -c -fPIC -I ./includes/ SA/src/whoami.c -o SA/src/whoami.o
whoami32:
gcc -m32 -c -fno-stack-protector -fno-pie -I ./includes/ SA/src/whoami.c -o SA/src/whoami32.o
tasklist:
gcc -c -fPIC -I ./includes/ SA/src/tasklist.c -o SA/src/tasklist.o
tasklist32:
gcc -m32 -c -fno-stack-protector -fno-pie -I ./includes/ SA/src/tasklist.c -o SA/src/tasklist32.o
cat:
gcc -c -fPIC -I ./includes/ SA/src/cat.c -o SA/src/cat.o
cat32:
gcc -m32 -c -fno-stack-protector -fno-pie -I ./includes/ SA/src/cat.c -o SA/src/cat32.o
uname:
gcc -c -fPIC -I ./includes/ SA/src/uname.c -o SA/src/uname.o
uname32:
gcc -m32 -c -fno-stack-protector -fno-pie -I ./includes/ SA/src/uname.c -o SA/src/uname32.o
id:
gcc -c -fPIC -I ./includes/ SA/src/id.c -o SA/src/id.o
id32:
gcc -m32 -c -fno-stack-protector -fno-pie -I ./includes/ SA/src/id.c -o SA/src/id32.o
walk:
gcc -c -fPIC -I ./includes/ SA/src/walk.c -o SA/src/walk.o
walk32:
gcc -m32 -c -fno-stack-protector -fno-pie -I ./includes/ SA/src/walk.c -o SA/src/walk32.o
env:
gcc -c -fPIC -I ./includes/ SA/src/env.c -o SA/src/env.o
env32:
gcc -m32 -c -fno-stack-protector -fno-pie -I ./includes/ SA/src/env.c -o SA/src/env32.o
grep:
gcc -c -fPIC -I ./includes/ SA/src/grep.c -o SA/src/grep.o
grep32:
gcc -m32 -c -fno-stack-protector -fno-pie -I ./includes/ SA/src/grep.c -o SA/src/grep32.o
find:
gcc -c -fPIC -I ./includes/ SA/src/find.c -o SA/src/find.o
find32:
gcc -m32 -c -fno-stack-protector -fno-pie -I ./includes/ SA/src/find.c -o SA/src/find32.o
chmod:
gcc -c -fPIC -I ./includes/ SA/src/chmod.c -o SA/src/chmod.o
chmod32:
gcc -m32 -c -fno-stack-protector -fno-pie -I ./includes/ SA/src/chmod.c -o SA/src/chmod32.o
pwd:
gcc -c -fPIC -I ./includes/ SA/src/pwd.c -o SA/src/pwd.o
pwd32:
gcc -m32 -c -fno-stack-protector -fno-pie -I ./includes/ SA/src/pwd.c -o SA/src/pwd32.o
ifconfig:
gcc -c -fPIC -I ./includes/ SA/src/ifconfig.c -o SA/src/ifconfig.o
ifconfig32:
gcc -m32 -c -fno-stack-protector -fno-pie -I ./includes/ SA/src/ifconfig.c -o SA/src/ifconfig32.o
clean:
rm -f ELFLoader*.out
rm -f ELFLoader*.exe
rm -f ./SA/src/*.o
rm -f testobjects/*.o
rm -f ELFLoader_public
rm -f libELFLoader.so
.PHONY: x86_64 x86_64D test2_dup test2 test clean