ALMANANHE DE BRINCADEIRAS - 500 atividades escolares
Invasão Sistemas 40
1. Invasão de Sistemas Computacionais
Rodrigo Almeida
Universidade Federal de Itajubá
2. Atenção
● As informações deste documento estão
disponíveis sob CC ou domínio público,
dependendo de sua origem.
● Os detalhes aqui apresentados servem para
estudo e aprendizado, as demais atividades
não são apoiadas.
http://xkcd.com/538/
3. Resumo
● Ataques
● Vulnerabilidades
● Ataques à sistemas de computação
● Exemplos
– Stuxnet
– Flame
– Sql injection
● Engenharia Reversa de Portas Seriais
● Fonte de informação
4. Ataque
● Um ataque pode ter vários objetivos
– Destruir
– Expor
– Alterar
– Desligar
– Roubar
– Ganhar acesso
– Utilizar um recurso
5. ● Um ataque bem sucedido quebra umas
destas três premissas de segurança:
– Confidencialidade
– Integridade
– Disponibilidade
6. Vulnerabilidades
● Fisico ●
Pessoal
– Umidade – Processo de recrutamento
– Poeira impróprio
– Temperatura – Falta de treinamento
– Armazenamento impróprio ●
Local
● Lógico (SW) – Problema com energia
– Testes insuficientes – Fácil invasão
– Falta de auditoria
●
Organização
● Rede
– Falta de direcionamento
– Canais de comunicação impróprios
– Falta de planejamento
– Arquitetura de rede imprópria
– Falta de segurança
7. Passive x Active
● Wiretapping ● Denial-of-service attack
●
Spoofing
● Port scanner ●
Rede
● Idle scan – Man in the middle
– ARP poisoning
– Ping flood
– Ping of death
– Smurf attack
●
Local
– Buffer/heap overflow
– Format string attack
8. Exemplos
● Stuxnet/duqu/flame
● Mysql injection
9. Stuxnet
● Stuxnet is unusually large at half a megabyte
in size and written in several different
programming languages (including C and C+
+) which is also irregular for malware.
11. Stuxnet
● Infected computers per country
– Iran 58.85%
– Indonesia 18.22%
– India 8.31%
– Azerbaijan 2.57%
– United States 1.56%
– Pakistan 1.28%
– Others 9.20%
12. Stuxnet
● Processo de invasão
– Sistema operacional Windows
– Siemens PCS 7, WinCC e STEP7
– Um ou mias Siemens S7 PLCs.
13. Stuxnet
● Windows:
– using an unprecedented four zero-day attacks (plus the CPLINK vulnerability and a
vulnerability used by the Conficker worm[33]).
– spread using infected removable drives such as USB flash drives and then uses other
exploits and techniques such as peer-to-peer RPC to infect and update other computers
inside private networks that are not directly connected to the Internet.
– The Windows component of the malware is promiscuous in that it spreads relatively quickly
and indiscriminately.[28]
– Has both user-mode and kernel-mode rootkit capability
– Its device drivers have been digitally signed with the private keys of two certificates that
were stolen from separate well-known companies, JMicron and Realtek
● Two websites in Denmark and Malaysia were configured as command and control
servers for the malware, allowing it to be updated, and for industrial espionage to
be conducted by uploading information.
14. Stuxnet
●
Programa do Step 7
– infects project files belonging to Siemens' WinCC/PCS 7 SCADA
control software
– subverts a communication library of WinCC called s7otbxdx.dll.
– this way, the malware is able to install itself on PLC devices unnoticed
– mask its presence from WinCC if the control software attempts to read
an infected block of memory from the PLC system.
– used a zero-day exploit in the WinCC/SCADA database software in the
form of a hard-coded database password.
16. Stuxnet
● CLP
– targets only SCADA configurations that meet criteria
– requires specific slave frequency attached to Siemens S7-300
– only attacks systems that spin between 807 Hz and 1210 Hz.
– installs malware into memory that monitors the Profibus messaging
bus
– When certain criteria are met
● Modifies the frequency to 1410 Hz, then to 2 Hz, then to 1064 Hz
● It also installs a rootkit that hides the malware on the system
17. Stuxnet
●
Resultado:
– Statistics published by the Federation of American Scientists (FAS)
show that the number of enrichment centrifuges operational in Iran
mysteriously declined from about 4,700 to about 3,900 beginning
around the time the nuclear incident WikiLeaks mentioned would have
occurred.
– (ISIS) suggests in a report published in December 2010 that Stuxnet is
"a reasonable explanation for the apparent damage" at Natanz and
may have destroyed up to 1000 centrifuges (10 percent) sometime
between November 2009 and late January 2010.
18. Flame
● Possui 20 megabytes.
● Escrito em Lua e C++ permitindo adição de mais módulos depois
● The malware uses five different encryption methods and an SQLite
database to store structured information.
● Determina quais antivirus estão instalados e muda seu comportamento
● Pode gravar audio, screenshots, atividade do teclado e trafego da rede.
● Pode gravar conversas do Skype e até roubar dados de equipamentos
com conexão bluetooth habilitada.
● Procura arquivos de AutoCAD, PDFs e documentos de texto.
● Uma rede de 80 servidores era usada para controlar as máquinas
infectadas
19. Flame
●
Lista dos módulos instalados no flame
– Flame Modules that perform attack functions
– Boost Information gathering modules
– Flask A type of attack module
– Jimmy A type of attack module
– Munch Installation and propagation modules
– Snack Local propagation modules
– Spotter Scanning modules
– Transport Replication modules
– Euphoria File leaking modules
– Headache Attack parameters or properties
20. Sql injection
● Vazamento das senhas do servidor cerpch
– 11/09/12
● Senhas e logins de administrador vazados por
Anonwiki1911
21.
22. Sql injection
● Cerpch, 2a vez
– @TeamBCA: "http://t.co/r3m0v3d# (National
Centre Of Reference In Small Hydro Power
Plant)#Hacked DataBase By Brazilian Cyber Army
http://t.co/r3m0v3d#"
● Desta vez todo o banco de dados foi
“dumpado”, incluindo as senhas e ID's dos
administradores
23.
24.
25. Engenharia Reversa
● Copiado descaradamente do
www.devttys0.com
● Metodologia para encontrar e acessar portas
seriais (UART)
● Portas serias são ótimas para acesso ao
sistema, principalmente se o projetista deixou
aberto o canal de debug (muito comum)
30. Engenharia Reversa
● Identificação do GND
– Continuidade com plano de terra
● Identificação do VCC
– Continuidade pode não funcionar
– Teste de tensão: 3.3v, 5v etc.
31. Engenharia Reversa
● Identificar os pinos de TX e RX
● TX
– Pode apresentar flutuações no valor de tensão
principalmente no boot do sistema
– Geralmente tem nível alto nos primeiros
momentos do boot
● RX
– É o outro
32. Engenharia Reversa
● Na placa o conector P1402 apresenta os
terminais 1, 3 e 4 estáveis com 3.3v
● No conector P1404 o pino 2 apresenta o nivel
de tensão oscilando
33. Engenharia Reversa
● Adaptando um conector para serial
– Lembrar que UART não é RS232!
34. Engenharia Reversa
● Agora é só descobrir a taxa de transmissão e
testar quais comandos o sistema aceita