lang/php
capture on nginx to php-fpm unix-socket
C/H
2022. 3. 31. 00:23
- NGINX - PHP-FPM. File not found. 문제 해결
- Sniffing Unix Socket - debugging communication between nginx and php-fpm
- socat - Multipurpose relay
- socat 명령어
- [Ubuntu] socat 을 사용한 포트 포워딩 Port forwarding
- socat 리눅스 가상 시리얼 포트(컴포트) 사용법 (RS232 테스트)
- CTF 사이트&문제 서버 설정 팁
- CTF를 위한 공부 가이드 Capture The Flag
tcpdump
sudo tcpdump port 9000 -A | strings
socat
socket cat
sudo apt-get install socat
#sudo socat -t100 -x -v UNIX-LISTEN:{virtual-socket},mode=777,reuseaddr,fork UNIX-CONNECT:{real-socket}
sudo socat -t100 -v UNIX-LISTEN:{virtual-socket},mode=777,reuseaddr,fork UNIX-CONNECT:{real-socket}
sudo socat -t100 -v UNIX-LISTEN:/var/run/shm/php7.4-fpm.sock.socat,mode=777,reuseaddr,fork UNIX-CONNECT:/var/run/shm/php7.4-fpm.sock
- change
fastcgi_pass unix:/var/run/shm/php7.4-fpm.sock.socat;
- open web page
- socat -v
- socat -x -v
# send pc
sudo socat -u GOPEN:./source.file TCP:192.168.0.1:9999
# receive pc
sudo socat -u TCP-LISTEN:9999 CREATE:target.file
# TCP to UDP
sudo socat TCP-LISTEN:2223,fork,reuseaddr,bind=10.164.0.17 UDP-CONNECT:127.0.0.1:2223,reuseaddr
# Redirect
sudo socat TCP-LISTEN:443,fork TCP:domain.com:80
sudo socat UDP-LISTEN:4443,fork UDP:domain.com:80
- 가상 시리얼포트 생성
- 가상 시리얼포트 읽기
- 내용을 시리얼포트로 보내기
- 결과
반응형