File size: 1,189 Bytes
d289b5b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
.POSIX:
CXX     = clang++
CFLAGS = -std=c++17 -Wall -Wextra -O3 -g3 -Werror

all: SystemSan target target_file target_dns

SystemSan: SystemSan.cpp inspect_dns.cpp inspect_utils.cpp
	$(CXX) $(CFLAGS) -lpthread -o $@ $^

# Needs atheris.
python-test: all
	./SystemSan python shell_injection_poc_fuzzer.py

target: target.cpp
	$(CXX) $(CFLAGS) -fsanitize=address,fuzzer -o $@ $^

target_file: target_file.cpp
	$(CXX) $(CFLAGS) -fsanitize=address,fuzzer -o $@ $^

target_dns: target_dns.cpp
	$(CXX) $(CFLAGS) -fsanitize=address,fuzzer -o $@ $^

test:  all vuln.dict
	./SystemSan ./target -dict=vuln.dict
	./SystemSan ./target_file -dict=vuln.dict
	./SystemSan ./target_dns -dict=vuln.dict

pytorch-lightning-1.5.10:
	cp SystemSan.cpp PoEs/pytorch-lightning-1.5.10/; \
	cd PoEs/pytorch-lightning-1.5.10/; \
	docker build . --tag syssan_pytorch-lightning; \
	docker run -t systemsan_pytorch-lightning:latest;

node-shell-quote-v1.7.3:
	cp SystemSan.cpp PoEs/node-shell-quote-v1.7.3/; \
	cd PoEs/node-shell-quote-v1.7.3/; \
	docker build . --tag systemsan_node-shell-quote; \
	docker run -t systemsan_node-shell-quote:latest;

clean:
	rm -f SystemSan /tmp/tripwire target target_file target_dns