segurança de sistemas: invasões, engenharia reversa e análise de virus

Post on 09-Jun-2015

1.404 Views

Category:

Education

5 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Invasão de Sistemas Computacionais

Rodrigo AlmeidaUniversidade Federal de Itajubá

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/

Resumo

● Ataques● Vulnerabilidades● Ataques à sistemas de computação● Exemplos

– Stuxnet

– Flame

– Sql injection

● Engenharia Reversa de Portas Seriais● Fonte de informação

Ataque

● Um ataque pode ter vários objetivos– Destruir

– Expor

– Alterar

– Desligar

– Roubar

– Ganhar acesso

– Utilizar um recurso

● Um ataque bem sucedido quebra umas destas três premissas de segurança:– Confidencialidade

– Integridade

– Disponibilidade

● Fisico– Umidade

– Poeira

– Temperatura

– Armazenamento impróprio

● Lógico (SW)– Testes insuficientes

– Falta de auditoria

● Rede– Canais de comunicação impróprios

– Arquitetura de rede imprópria

Vulnerabilidades

● Pessoal– Processo de recrutamento

impróprio

– Falta de treinamento

● Local– Problema com energia

– Fácil invasão

● Organização– Falta de direcionamento

– Falta de planejamento

– Falta de segurança

● Wiretapping● Port scanner● Idle scan

Passive x Active

● Denial-of-service attack● Spoofing● Rede

– Man in the middle

– ARP poisoning– Ping flood

– Ping of death– Smurf attack

● Local– Buffer/heap overflow

– Format string attack

Exemplos

● Stuxnet/duqu/flame● Mysql injection

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.

Stuxnet

Ulli1105 http://en.wikipedia.org/wiki/File:S7300.JPG

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%

Stuxnet

● Processo de invasão– Sistema operacional Windows

– Siemens PCS 7, WinCC e STEP7

– Um ou mias Siemens S7 PLCs.

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.

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.

http://en.wikipedia.org/wiki/File:Step7_communicating_with_plc.svg

http://en.wikipedia.org/wiki/File:Stuxnet_modifying_plc.svgGrixlkraxl

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

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.

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

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

Sql injection

● Vazamento das senhas do servidor cerpch– 11/09/12

● Senhas e logins de administrador vazados por Anonwiki1911

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

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)

Engenharia Reversa

● Utilizando uma placa de roteador para testes

Engenharia Reversa

● Primeiro passo, encontrar possíveis conectores de serial (2-4 pinos)

Engenharia Reversa

● Primeira inspeção visual:

Engenharia Reversa

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.

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

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

Engenharia Reversa

● Adaptando um conector para serial– Lembrar que UART não é RS232!

Engenharia Reversa

● Agora é só descobrir a taxa de transmissão e testar quais comandos o sistema aceita

Engenharia Social

Fonte de informação

● Twitter● mIRC● Facebook● 4chan● Congressos

– Defcon

– Blackhat

– BSidesSP/CoOL

– H2HC

top related