Contenu connexe
Similaire à T.Pollak y C.Yaconi - Prey
Similaire à T.Pollak y C.Yaconi - Prey (20)
Plus de StarTech Conference
Plus de StarTech Conference (11)
T.Pollak y C.Yaconi - Prey
- 14. Bash Objective-C
Python Java
Ruby C / C++
NodeJS C# (.NET)
- 15. !
Bash Objective-C
Python Java
Ruby C / C++
NodeJS C# (.NET)
- 55. Linux TCP/IP Stack Tuning
Connection count by status
$ netstat -an | awk '/tcp/ {print $6}'
| sort | uniq -c
30 CLOSE_WAIT
2234 ESTABLISHED
4 FIN_WAIT1
14 LISTEN
6 SYN_RECV
3222 TIME_WAIT
- 56. Linux TCP/IP Stack Tuning
$ sysctl -a
# max sockets, connections
net.core.somaxconn = 131072
net.core.netdev_max_backlog = 131072
net.ipv4.tcp_max_syn_backlog = 35536
# reuse & recycle TCP sockets
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
- 57. Linux TCP/IP Stack Tuning
# disable syncookies
net.ipv4.tcp_syncookies = 0
# timeouts & retries
net.ipv4.tcp_orphan_retries = 3
net.ipv4.tcp_fin_timeout = 2
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_syn_retries = 2
# sysctl -p # reloads settings
- 58. nf_conntrack_max
- limited by kernel memory
- decreased tcp_timeout_time_wait
- decreased tcp_fin_timeout
- no workie
- we disabled connection tracking
altogether, and it worked!
iptables -A PREROUTING -p tcp --dport
80 -j NOTRACK
- 69. Angry Boss!
- 11 jobs pending. 6 workers running. On loop 75036!
- Spawning worker #7...
- [Worker #6] Report.process! completed after 2.1819
- [Worker #2] Report.process! completed after 2.6006
- [Worker #1] Notifier.deliver_report_notification
completed after 0.1067
- 8 jobs pending. 7 workers running. On loop 75036!
- Spawning worker #8...