Mostra notizie nelle discussioni
  • Avatar
    ☺
    Scritto da
    il 2010-12-13 18:10:00.0 alle 2010-12-13 18:10:00.0
    Trollate totali: 4330
    Your Botnet is My Botnet
    Analysis of a Botnet Takeover
    Brett Stone-Gross, Marco Cova, Lorenzo Cavallaro, Bob Gilbert, Martin Szydlowski,
    Richard Kemmerer, Christopher Kruegel, and Giovanni Vigna
    Department of Computer Science, University of California, Santa Barbara

    tutto ambientato nel 2009, consiglio di leggere tutto il pdf perchè è proprio interessante.
    www.cs.ucsb.edu/~seclab/projects/torpig/torpig.pdf

    A particularly sophisticated and insidi-
    ous type of bot is Torpig, a malware program that is designed to
    harvest sensitive information (such as bank account and credit card
    data) from its victims. In this paper, we report on our efforts to take
    control of the Torpig botnet and study its operations for a period of
    ten days. During this time, we observed more than 180 thousand
    infections and recorded almost 70 GB of data that the bots col-
    lected. While botnets have been “hijacked” and studied previously,
    the Torpig botnet exhibits certain properties that make the analysis
    of the data particularly interesting. First, it is possible (with rea-
    sonable accuracy) to identify unique bot infections and relate that
    number to the more than 1.2 million IP addresses that contacted our
    command and control server. Second, the Torpig botnet is large,
    targets a variety of applications, and gathers a rich and diverse set
    of data from the infected victims. This data provides a new un-
    derstanding of the type and amount of personal information that is
    stolen by botnets.
    A more active approach to study botnets is via infiltration. That
    is, using an actual malware sample or a client simulating a bot,
    researchers join a botnet to perform analysis from the inside. To
    achieve this, honeypots, honey clients, or spam traps are used to
    obtain a copy of a malware sample. The sample is then executed in
    a controlled environment, which makes it possible to observe the
    traffic that is exchanged between the bot and its command and con-
    trol (C&C) server(s).

    To overcome the limitations of passive measurements and infil-
    tration – in particular in the case of centralized IRC and HTTP
    botnets – one can attempt to hijack the entire botnet, typically by
    taking control of the C&C channel. One way to achieve this is
    to directly seize the physical machines that host the C&C infras-
    tructure [8]. Of course, this is only an option for law enforcement
    agencies. Alternatively, one can tamper with the domain name ser-
    vice (DNS), as bots typically resolve domain names to connect to
    their command and control infrastructure. Therefore, by collab-
    orating with domain registrars (or other entities such as dynamic
    DNS providers), it is possible to change the mapping of a botnet
    domain to point to a machine controlled by the defender [6]. Fi-
    nally, several recent botnets, including Torpig, use the concept of
    domain flux. With domain flux, each bot periodically (and inde-
    pendently) generates a list of domains that it contacts. The bot
    then proceeds to contact them one after another. The first host that
    sends a reply that identifies it as a valid C&C server is considered
    genuine, until the next period of domain generation is started. By
    reverse engineering the domain generation algorithm, it is possible
    to pre-register domains that bots will contact at some future point,
    thus denying access to the botmaster and redirecting bot requests
    to a server under one’s own control. This provides a unique view
    on the entire infected host population and the information that is
    collected by the botmasters.

    Torpig has certain properties that make our analysis particularly in-
    teresting.
    First, Torpig bots transmit identifiers that permit us to distinguish
    between individual infections. This is different from other botnets
    such as Conficker. The presence of unique identifiers allows us to
    perform a precise estimate of the botnet size. Moreover, we can
    account for DHCP churn and NAT effects, which are well-known
    problems when computing botnet sizes. In addition, we compare
    our results to IP-based techniques that are commonly used to esti-
    mate botnet populations.
    Second, Torpig is a data harvesting bot that targets a wide vari-
    ety of applications and extracts a wealth of information from the
    infected victims. Together with the large size of the botnet (we
    observed more than 180 thousand infections), we have access to
    a rich data set that sheds light on the quantity and nature of the
    data that cyber-criminals can harvest, the financial profits that they
    can make, and the threats to the security and privacy of bot vic-
    tims.

    So far, Torpig has been distributed to its victims as part of Meb-
    root. Mebroot is a rootkit that takes control of a machine by replac-
    ing the system’s Master Boot Record (MBR). This allows Mebroot
    to be executed at boot time, before the operating system is loaded,
    and to remain undetected by most anti-virus tools. More details
    on Mebroot can be found in [9, 12, 25]. In this paper, we will focus
    on Torpig, introducing Mebroot only when necessary to understand
    Torpig’s behavior. In particular, hereinafter, we present the life cy-
    cle of Torpig and the organization of the Torpig botnet, as we ob-
    served it during the course of our analysis. We will use Figure 1 as
    a reference.
    Victims are infected through drive-by-download attacks [33]. In
    these attacks, web pages on legitimate but vulnerable web sites (1)
    are modified with the inclusion of HTML tags that cause the vic-
    tim’s browser to request JavaScript code (2) from a web site (the
    drive-by-download server in the figure) under control of the attack-
    ers (3). This JavaScript code launches a number of exploits against
    the browser or some of its components, such as ActiveX controls
    and plugins. If any exploit is successful, an executable is down-
    loaded from the drive-by-download server to the victim machine,
    and it is executed (4).
    The downloaded executable acts as an installer for Mebroot. The
    installer injects a DLL into the file manager process (explor-
    er.exe), and execution continues in the file manager’s context.
    This makes all subsequent actions appear as if they were performed
    by a legitimate system process. The installer then loads a kernel
    driver that wraps the original disk driver (disk.sys). At this
    point, the installer has raw disk access on the infected machine.
    The installer can then overwrite the MBR of the machine with Me-
    broot. After a few minutes, the machine automatically reboots, and
    Mebroot is loaded from the MBR.

    --> continua
    • Avatar
      ☺
      Scritto da
      il 2010-12-13 18:12:00.0 alle 2010-12-13 18:12:00.0
      Trollate totali: 4330
      Re: Your Botnet is My Botnet
      After the initial update, Mebroot contacts its C&C
      server periodically, in two-hour intervals, to report its current con-
      figuration (i.e., the type and version number of the currently in-
      stalled modules) and to potentially receive updates. All commu-
      nication with the C&C server occurs via HTTP requests and re-
      sponses and is encrypted using a sophisticated, custom encryption
      algorithm [9]. Currently, no publicly available tool exists to cir-
      cumvent this encryption scheme.
      During our monitoring, the C&C server distributed three mod-
      ules, which comprise the Torpig malware. Mebroot injects these
      modules (i.e., DLLs) into a number of applications. These appli-
      cations include the Service Control Manager (services.exe),
      the file manager, and 29 other popular applications, such as web
      browsers (e.g., Microsoft Internet Explorer, Firefox, Opera), FTP
      clients (CuteFTP, LeechFTP), email clients (e.g., Thunderbird, Out-
      look, Eudora), instant messengers (e.g., Skype, ICQ), and system
      programs (e.g., the command line interpreter cmd.exe). After
      the injection, Torpig can inspect all the data handled by these pro-
      grams and identify and store interesting pieces of information, such
      as credentials for online accounts and stored passwords.
      Periodically (every twenty minutes, during the time we moni-
      tored the botnet), Torpig contacts the Torpig C&C server to upload
      the data stolen since the previous reporting time (6).
      This com-
      munication with the server is also over HTTP and is protected by
      a simple obfuscation mechanism, based on XORing the clear text
      with an 8-byte key and base64 encoding. This scheme was broken
      by security researchers at the end of 2008, and tools are available
      to automate the decryption [20]. The C&C server can reply to a
      bot in one of several ways. The server can simply acknowledge the
      data. We call this reply an okn response, from the string contained
      in the server’s reply. In addition, the C&C server can send a con-
      figuration file to the bot (we call this reply an okc response). The
      configuration file is obfuscated using a simple XOR-11 encoding.
      It specifies how often the bot should contact the C&C server, a set
      of hard-coded servers to be used as backup, and a set of parameters
      to perform “man-in-the-browser” phishing attacks [14].
      Torpig uses phishing attacks to actively elicit additional, sensi-
      tive information from its victims, which, otherwise, may not be ob-
      served during the passive monitoring it normally performs. These
      attacks occur in two steps. First, whenever the infected machine
      visits one of the domains specified in the configuration file (typi-
      cally, a banking web site), Torpig issues a request to an injection
      server. The server’s response specifies a page on the target domain
      where the attack should be triggered (we call this page the trigger page, and it is typically set to the login page of a site), a URL on
      the injection server that contains the phishing content (the injection
      URL), and a number of parameters that are used to fine tune the
      attack (e.g., whether the attack is active and the maximum number
      of times it can be launched). The second step occurs when the user
      visits the trigger page. At that time, Torpig requests the injection
      URL from the injection server and injects the returned content into
      the user’s browser (7). This content typically consists of an HTML
      form that asks the user for sensitive information, for example, credit
      card numbers and social security numbers.
      These phishing attacks are very difficult to detect, even for at-
      tentive users. In fact, the injected content carefully reproduces
      the style and look-and-feel of the target web site. Furthermore,
      the injection mechanism defies all phishing indicators included in
      modern browsers. For example, the SSL configuration appears
      correct, and so does the URL displayed in the address bar.


      A fundamental aspect of any botnet is that of coordination; i.e.,
      how the bots identify and communicate with their C&C servers.
      Traditionally, C&C hosts have been located by their bots using their
      IP address, DNS name, or their node ID in peer-to-peer overlays.
      In the recent past, botnet authors have identified several ways to
      make these schemes more flexible and robust against take-down
      actions, e.g., by using IP fast-flux techniques [17]. With fast-flux,
      the bots would query a certain domain that is mapped onto a set of
      IP addresses, which change frequently. This makes it more difficult
      to take down or block a specific C&C server. However, fast-flux
      uses only a single domain name, which constitutes a single point of
      failure.
      Torpig solves this issue by using a different technique for locat-
      ing its C&C servers, which we refer to as domain flux. With domain
      flux, each bot uses a domain generation algorithm (DGA) to com-
      pute a list of domain names. This list is computed independently
      by each bot and is regenerated periodically. Then, the bot attempts
      to contact the hosts in the domain list in order until one succeeds,
      i.e., the domain resolves to an IP address and the corresponding
      server provides a response that is valid in the botnet’s protocol. If a
      domain is blocked (for example, the registrar suspends it to comply
      with a take-down request), the bot simply rolls over to the following
      domain in the list. Domain flux is also used to contact the Mebroot
      C&C servers and the drive-by-download servers. Domain flux is
      increasingly popular among botnet authors. In fact, similar mech-
      anisms were used before by the Kraken/Bobax [1] and the Srizbi
      bots [46], and, more recently, by the Conficker worm [32].
      In Torpig, the DGA is seeded with the current date and a numer-
      ical parameter. The algorithm first computes a “weekly” domain
      name, say dw, which depends on the current week and year, but is
      independent of the current day (i.e., remains constant for the en-
      tire week). Using the generated domain name dw, a bot appends
      a number of TLDs: in order, dw.com, dw.net, and dw.biz. It then
      resolves each domain and attempts to connect to its C&C server. If
      all three connections fail, Torpig computes a “daily” domain, say
      dd, which in addition depends on the current day (i.e., a new do-
      main dd is generated each day). Again, dd.com is tried first, with
      fallbacks to dd.net and dd.biz. If these domains also fail, Torpig at-
      tempts to contact the domains hardcoded in its configuration file
      (e.g., rikora.com, pinakola.com, and flippibi.com).
      Listing 1 shows the pseudo-code of the routines used to generate
      the daily domains dd. The DGA used in Torpig is completely deter-
      ministic; i.e., once the current date is determined, all bots generate
      the same list of domains, in the same order.
      • Avatar
        ☺
        Scritto da
        il 2010-12-13 18:13:00.0 alle 2010-12-13 18:13:00.0
        Trollate totali: 4330
        Re: Your Botnet is My Botnet
        In practice, the Torpig controllers registered the weekly .com do-
        main and, in a few cases, the corresponding .net domain, for backup
        purposes. However, they did not register all the weekly domains in
        advance, which was a critical factor in enabling our hijacking.
        The use of domain flux in botnets has important consequences
        in the arms race between botmasters and defenders. From the at-
        tacker’s point of view, domain flux is yet another technique to po-
        tentially improve the resilience of the botnet against take-down at-
        tempts. More precisely, in the event that the current rendezvous
        point is taken down, the botmasters simply have to register the next
        domain in the domain list to regain control of their botnet. On the
        contrary, to the defender’s advantage, domain flux opens up the
        possibility of sinkholing (or "hijacking") a botnet, by registering an
        available domain that is generated by the botnet’s DGAs and re-
        turning an answer that is a valid C&C response (to keep bots from
        switching over to the next domain in the domain list). As we men-
        tioned, Torpig allowed both of these actions: C&C domain names
        were available for registration, and it was possible to forge valid
        C&C responses.
        The feasibility of these sinkholing attacks depends not only on
        technical means (e.g., the ability to reverse engineer the botnet pro-
        tocol and to forge a valid C&C server’s response), but also on eco-
        nomic factors, in particular the cost of registering a number of do-
        mains sufficient to make the sinkholing effective. Since domain
        registration comes at a price (currently, from about $5 to $10 per
        year per .com and .net domain name), botmasters could prevent
        attacks against domain flux by making them economically infeasi-
        ble, for example, by forcing defenders to register a disproportionate
        number of names. Unfortunately, this is a countermeasure that is
        already in use. Newer variants of Conficker generate 50,000 do-
        mains per day and introduce non-determinism in their generation
        algorithm [32]. Taking over all the domains generated by Conficker
        at market prices would cost between $91.3 million and $182.5 mil-
        lion per year. Furthermore, the domain flux arms race is clearly in
        favor of the malware authors. Generating thousands more domains
        requires an inexpensive modification to the bot code base, while
        registering them costs time and money.

        We registered domains that bots would
        resolve and setup a server to which bots would connect to find their
        C&C. Moreover, we present our data collection and hosting infras-
        tructure and review a timeline of events during our period of con-
        trol.
        The behavior of the botmasters was to not register many of the
        future Torpig C&C domains in advance. Therefore, we were able to
        register the .com and .net domains that were to be used by the bot-
        net for three consecutive weeks from January 25th, 2009 to Febru-
        ary 15th, 2009. However, on February 4th, 2009, the Mebroot con-
        trollers distributed a new Torpig binary that updated the domain
        algorithm. This ended our control prematurely after ten days. Me-
        broot domains, in fact, allow botmasters to upgrade, remove, and
        install new malware components at any time, and are tightly con-
        trolled by the criminals. It is unclear why the controllers of the
        Mebroot botnet did not update the Torpig domain algorithm sooner
        to thwart our sinkholing.

        All bots communicate with the Torpig C&C through HTTP POST
        requests. The URL used for this request contains the hexadecimal
        representation of the bot identifier and a submission header. The
        body of the request contains the data stolen from the victim’s ma-
        chine, if any. The submission header and the body are encrypted
        using the Torpig encryption algorithm (base64 and XOR). The bot
        identifier (a token that is computed on the basis of hardware and
        software characteristics of the infected machine) is used as the sym-
        metric key and is sent in the clear.

        After decryption, the submission header consists of a number of
        key-value pairs that provide basic information about the bot. More
        precisely, the header contains the time stamp when the configura-
        tion file was last updated (ts), the IP address of the bot or a list
        of IPs in case of a multi-homed machine (ip), the port numbers of
        the HTTP and SOCKS proxies that Torpig opens on the infected
        machine (hport and sport), the operating system version and
        locale (os and cn), the bot identifier (nid), and the build and ver-
        sion number of Torpig (bld and ver). Figure 3 shows a sample of
        the header information sent by a Torpig bot.
        The request body consists of zero or more data items of different
        types, depending on the information that was stolen.
        the different data types that we observed during our monitoring. In
        particular, mailbox account items contain the configuration infor-
        mation for email accounts, i.e., the email address associated with
        the mailbox and the credentials required to access the mailbox and
        to send emails from it. Torpig obtains this information from email
        clients, such as Outlook, Thunderbird, and Eudora. Email items
        consist of email addresses, which can presumably be used for spam
        purposes.
        -----------------------------------------------------------
        Modificato dall' autore il 13 dicembre 2010 18.18
        -----------------------------------------------------------
        • Avatar
          ☺
          Scritto da
          il 2010-12-13 18:17:00.0 alle 2010-12-13 18:17:00.0
          Trollate totali: 4330
          Re: Your Botnet is My Botnet
          According to [45], Torpig initially used spam emails to
          propagate, which may give another explanation for the botmasters’
          interest in email addresses. Form data items contain the content of
          HTML forms submitted via POST requests by the victim’s browser.
          More precisely, Torpig collects the URL hosting the form, the URL
          that the form is submitted to, and the name, value, and type of all
          form fields. These data items frequently contain the usernames and
          passwords required to authenticate with web sites. Notice that cre-
          dentials transmitted over HTTPS are not safe from Torpig, since
          Torpig can access them before they are encrypted by the SSL layer
          (by hooking appropriate library functions). HTTP account, FTP
          account, POP account, and SMTP account data types contain the
          credentials used to access web sites, FTP, POP, and SMTP ac-
          counts, respectively. Torpig obtains this information by exploit-
          ing the password manager functionality provided by most web and
          email clients. SMTP account items also contain the source and des-
          tination addresses of emails sent via SMTP. Finally, the Windows
          password data type is used to transmit Windows passwords and
          other uncategorized data elements.

          da notare che nelle figure gli stati più colpiti da torpig paiono USA, germania e italia, in qualcosa siamo sempre tra i big...

          Data Type           Data Items (#)
          Mailbox account     54,090
          Email               1,258,862
          Form data           11,966,532
          HTTP account        411,039
          FTP account         12,307
          POP account         415,206
          SMTP account        100,472
          Windows password    1,235,122

          Questo è riferito alle financial institutions, sempre nei 10 giorni in cui l'hanno avuta in mano loro Sorpresa

          Country    Institutions    Accounts
          US         60             4,287
          IT         34             1,459
          DE         122             641
          ES         18             228            
          PL         14             102
<softv>

Pagina generata in 106 millisecondi

Utenti attivi: 10 nell'ultimo minuto, 22 negli ultimi cinque minuti, 42 negli ultimi 15 minuti