home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / SATRIANI / Cracker.txt < prev    next >
Text File  |  2000-05-25  |  38KB  |  822 lines

  1.  
  2.  
  3.     Techniques Adopted By 'System Crackers' When Attempting To Break Into
  4.     ---------------------------------------------------------------------
  5.                    Corporate or Sensitive Private Networks.
  6.                    ----------------------------------------
  7.  
  8.  
  9.  
  10.            By the consultants of the Network Security Solutions Ltd.
  11.           Front-line Information Security Team (FIST), December 1998.
  12.  
  13.  
  14.  
  15.                     fist@ns2.co.uk    http://www.ns2.co.uk
  16.  
  17.  
  18.  
  19.  
  20. ------------------------------------------------------------------------------
  21.    0    Table Of Contents
  22. ------------------------------------------------------------------------------
  23.  
  24.  
  25.    1.   Introduction
  26.    1.1  Just who is vulnerable anyway?
  27.    1.2  Profile of a typical 'system cracker'
  28.  
  29.    2    Networking
  30.    2.1  Networking methodologies adopted by many companies
  31.    2.2  Understanding vulnerabilities in such networked systems
  32.  
  33.    3    The attack itself
  34.    3.1  Techniques used to 'cloak' the attackers location
  35.    3.2  Network probing and information gathering
  36.    3.3  Identifying trusted network components
  37.    3.4  Identifying vulnerable network components
  38.    3.5  Taking advantage of vulnerable network components
  39.    3.6  Upon gain access to vulnerable network components
  40.  
  41.    4    Abusing network access and privileges
  42.    4.1  Downloading sensitive information
  43.    4.2  Cracking other trusted hosts networks
  44.    4.3  Installing backdoors and trojaned files
  45.    4.4  Taking down networks
  46.  
  47.    5    The improvement of total network security
  48.    5.1  Suggested reading
  49.    5.2  Suggested tools and programs
  50.  
  51.  
  52.  
  53. ------------------------------------------------------------------------------
  54.    1.0  Introduction
  55. ------------------------------------------------------------------------------
  56.  
  57.  
  58.  This white paper was written to help give systems administrators and network
  59.  operations staff an insight into the tactics and methodologies adopted by
  60.  typical system crackers when targeting large networks.
  61.  
  62.  This document is not a guide about how to secure your networks, although it
  63.  should help you identify security risks in your networked environment and
  64.  maybe help point out any accidents that are waiting to happen.
  65.  
  66.  We hope you enjoy reading this paper, and hopefully learn a little about
  67.  how crackers operate in the meantime!
  68.  
  69.  
  70.  
  71.  The Network Security Solutions Ltd. FIST staff (fist@ns2.co.uk)
  72.  
  73.  
  74.  
  75. ------------------------------------------------------------------------------
  76.    1.1  Just who is vulnerable anyway?
  77. ------------------------------------------------------------------------------
  78.  
  79.  
  80.  Networked computer environments are used everyday by corporations and various
  81.  organisations. Networks of computers allow users to share vast amounts of
  82.  data very efficiently.
  83.  
  84.  Usually corporate networks are not designed and implemented with security
  85.  in mind, merely functionality and efficiency, although this is good from a
  86.  business standpoint in the short-term, security problems usually arise
  87.  later, which can cost millions to solve in larger environments.
  88.  
  89.  Most corporate and sensitive private networks work on a client-server
  90.  principle, where employees use workstations to connect to servers in order
  91.  to share information. In this paper we will concentrate on server security,
  92.  as most crackers will always target servers first, the server is much like
  93.  a 'hub' where all the information is stored. If a cracker can gain
  94.  unauthorised access to such a server, the rest of his work is easy.
  95.  
  96.  Vulnerable parties to large-scale network probes usually include :
  97.  
  98.    Financial institutions and banks
  99.    Internet service providers
  100.    Pharmaceutical companies
  101.    Government and defense agencies
  102.    Contractors to various goverment agencies
  103.    Multinational corporations
  104.  
  105.  
  106.  Although many of these attacks take place internally (by users who have
  107.  authorised access to parts of the corporate or sensitive networks already),
  108.  we will be concentrating on the techniques used when breaking into such
  109.  networks entirely from the outside.
  110.  
  111.  Financial institutions and banks are probed and attacked in attempts to
  112.  commit fraud. Many banks have been targeted in this way, risking vast
  113.  monetary funds. Banks make it policy not to admit to being victims
  114.  of such external attacks because they will certainly lose customers and
  115.  trust if attacks are publically known.
  116.  
  117.  Internet service providers are a common target by crackers, as ISP servers
  118.  are easily accessible from the internet, and ISP's have access to large
  119.  fibre optic connections which can be used by crackers to move large
  120.  amounts of data across the internet. The larger ISP's also have customer
  121.  databases, which usually contain confidential user information such as
  122.  credit card numbers, names and addresses.
  123.  
  124.  Pharmaceutical companies are victims of mainly industrial espionage attempts,
  125.  where a team of crackers will be paid large amounts in exchange for stolen
  126.  pharmaceutical data, such drug companies often spend millions on research
  127.  and development, and a lot can be lost as a result of such an attack.
  128.  
  129.  Over the last 6 years, Government and defence agencies in the United States
  130.  have been victim to literally millions of attacks originating from the
  131.  internet. Due to the low information security budgets and the weak security
  132.  policies of such agencies, information security has become an uphill battle,
  133.  as government and military servers are constantly being probed and attacked
  134.  by crackers.
  135.  
  136.  Defence contractors, although security conscious, are targets to crackers
  137.  seeking classified or sensitive military data. Such data can then be
  138.  'sold on' by crackers to foreign groups. Although only a handful of these
  139.  cases have been publically known, such activities can occur at an alarming
  140.  rate.
  141.  
  142.  Multinational corporations are prime examples of victims of industrial
  143.  espionage attempts. Multinational corporations have offices based all around
  144.  the world, and large corporate networks are installed in order for employees
  145.  to be able to share information efficiently. NSS staff have performed
  146.  penetration tests for multinational corporations, and our findings in
  147.  most cases have shown that many can be compromised.
  148.  
  149.  Like pharmaceutical companies, multinational corporations operating in
  150.  electronics, software or computer-related industries, spend millions on
  151.  research and development of new technologies. It is very tempting for a
  152.  competitor of such a corporation, to employ a team of 'system crackers' to
  153.  steal data from a target corporation. Such data can then be used to quickly
  154.  and easily improve the competitors knowledge of key technologies, and result
  155.  in financial losses of the target corporation.
  156.  
  157.  Another form of attack adopted by competitors of corporations, is to 'take
  158.  down' a corporate network for a certain amount of time, this results in
  159.  loss of earnings for the target corporation. In most cases it is extremely
  160.  difficult to locate the source of such an attack. Depending on the internal
  161.  network segmentation in place, this kind of attack can be hugely effective
  162.  and result in massive financial losses.
  163.  
  164.  Such 'foul play' is commonplace in today's networked society, and should be
  165.  taken very seriously.
  166.  
  167.  
  168.  
  169. ------------------------------------------------------------------------------
  170.    1.2  Profile of a typical 'system cracker'
  171. ------------------------------------------------------------------------------
  172.  
  173.  
  174.  Studies have shown that typical a 'system cracker' is usually male, aged
  175.  between 16 and 25. Such crackers usually become interested in breaking into
  176.  machines and networks in order to improve their cracking skills, or to use
  177.  network resources for their own purposes. Most crackers are quite
  178.  persistent in their attacks, this is due to the amount of spare time an
  179.  average cracker has.
  180.  
  181.  
  182.  A high percentage of crackers are opportunists, and run scanners to check
  183.  massive numbers of hosts for remote system vulnerabilities. Upon identifying
  184.  hosts or networks that are vulnerable to remote attacks, the cracker will
  185.  usually gain root access to the host, then install a backdoor and patch the
  186.  host from common remote vulnerabilities, this prevents other crackers from
  187.  being able to use the same popular techniques to gain access to the host.
  188.  
  189.  Opportunists operate on primarily two domains, the first being the
  190.  internet, the second being telephone networks.
  191.  
  192.  To scan internet hosts for common remote vulnerabilities, the cracker will
  193.  usually launch a scanning operation from a host that he has access to with
  194.  a fast connection to the internet, usually on a fibre-optic connection.
  195.  
  196.  To scan for machines operating on telephone networks, being terminal servers,
  197.  bulletin board systems, or voice mail systems. The cracker will use a
  198.  wardialling program, this will automatically scan large amounts of telephone
  199.  numbers for 'carriers', thus identifying such systems.
  200.  
  201.  
  202.  A very small percentage of crackers actually define targets and attempt to
  203.  attack them, such crackers are far more skilled, and adopt 'cutting-edge'
  204.  techniques to compromise networks. It is known for these types of crackers
  205.  to attack corporate networks that are firewalled from the internet by
  206.  exploiting non-published vulnerabilities and 'features' in firewalls.
  207.  
  208.  The networks and hosts targeted by these crackers usually have sensitive
  209.  data contained within them, such as research and development notes,
  210.  or other data that will prove useful to the cracker.
  211.  
  212.  Such crackers are also known to have access to exploits and tools used by
  213.  security consultants and large security companies, and then use them to
  214.  scan defined targets for all known remote vulnerabilities. Crackers that
  215.  are attacking specific hosts are also usually very patient, and have been
  216.  known to spend many months gathering data before attempting to gain access
  217.  to a host or network.
  218.  
  219.  
  220.  
  221. ------------------------------------------------------------------------------
  222.    2.1  Networking methodologies adopted by many companies
  223. ------------------------------------------------------------------------------
  224.  
  225.  
  226.  A typical corporation will have an internet presence for the following
  227.  purposes :
  228.  
  229.    The hosting of corporate webservers
  230.    E-mail and other global communications via. the internet
  231.    To give employees internet access
  232.  
  233.  
  234.  Of the corporations NSS has performed network penetration tests from the
  235.  internet for, a networked environment is adopted where the corporate network
  236.  and the internet are seperated by firewalls and application proxies.
  237.  
  238.  In such environments, the corporate webservers and mailservers are usually
  239.  kept on the 'outside' of the corporate network, and then information is
  240.  passed via. trusted channels onto the corporate network.
  241.  
  242.  In the case of trust present between external mailservers and hosts on the
  243.  corporate network, a well-thought filtering policy has to be put into
  244.  effect, as usually the external mailservers should only be able to
  245.  connect to port 25 of a single 'secure' mailserver on the corporate
  246.  network, as this will massively minimise the probability of unauthorised
  247.  access, even if the external mailserver is compromised.
  248.  
  249.  One of the corporate networks NSS has performed penetration test on also had
  250.  a handful of 'dual-homed' hosts, these hosts had network interfaces active
  251.  on both the internet and the corporate network. From a security standpoint,
  252.  such hosts that operate on multiple networks can pose a massive threat to
  253.  network security, as upon compromising a host, it then acts as a simple
  254.  'bridge' between networks.
  255.  
  256.  
  257.  
  258. ------------------------------------------------------------------------------
  259.    2.2  Understanding vulnerabilities in such networked systems
  260. ------------------------------------------------------------------------------
  261.  
  262.  
  263.  On the internet, a corporation may have 5 external webservers, 2 external
  264.  mailservers, and a firewall or filtering system implemented.
  265.  
  266.  Webservers are usually not attacked by crackers wanting to gain access to
  267.  the corporate network, unless the firewall is misconfigured in some way
  268.  that will allow the cracker access to the corporate network upon compromising
  269.  the webserver. Although it is always good practise to secure your webservers
  270.  and run TCP wrappers to allow only trusted parties to connect to the telnet
  271.  and ftp ports.
  272.  
  273.  Mailservers are commonly targeted by crackers wanting to gain access to the
  274.  corporate network, as a mailserver must have access to mailservers on the
  275.  corporate network in order to distribute and exchange mail between the
  276.  internet and the corporate network. Again, depending on the filtering in
  277.  place, this tactic may or may not be effective on the cracker's part.
  278.  
  279.  Filtering routers are also commonly targeted by crackers with agressive-SNMP
  280.  scanners and community string brute-force programs, if such an attack is
  281.  effective, the router can easily be turned into a bridge, thus allowing
  282.  unauthorised access to the corporate network.
  283.  
  284.  
  285.  In this kind of situation the cracker will evaluate exactly which external
  286.  hosts he has access to, and then attempt to identify any kinds of trust
  287.  between the corporate network and the external hosts. Therefore if you
  288.  install TCP wrappers on all your external hosts, which define that only
  289.  trusted parties can connect to the critical ports of your hosts, which
  290.  are usually :
  291.  
  292.    ftp  (21),   ssh  (22),   telnet (23),   smtp   (25),   named (53),
  293.    pop3 (110),  imap (143),  rsh    (514),  rlogin (513),  lpd   (515).
  294.  
  295.  
  296.  SMTP, named and portmapper should be filtered accordingly depending on
  297.  the host's role is on the network.
  298.  
  299.  Such filtering has been proven to massively reduce the risk of an attack
  300.  on the corporate network.
  301.  
  302.  
  303.  In the cases of networks with no clear 'corporate to internet' network
  304.  security policy, multiple-homed hosts and misconfigured routers will exist.
  305.  A lack of internal network segmentation will also usually exist, this
  306.  makes it a lot easier for an cracker based on the internet to gain
  307.  unauthorised access to the corporate network.
  308.  
  309.  Corporate network mapping can easily occur if external DNS servers are
  310.  misconfigured, as NSS has performed penetration tests where we have been
  311.  able to map the corporate network via. such a misconfigured DNS server,
  312.  because of this, it is very important that DNS doesn't exist between
  313.  hosts on the corporate network and external hosts, it is far safer to
  314.  simply use IP addresses to connect to external machines from the corporate
  315.  network and vice-versa.
  316.  
  317.  Insecure hosts with network interfaces active on multiple networks can
  318.  be abused to gain access to the corporate network very easily.
  319.  The insecure host doesn't even have to be compromised. It is very easy
  320.  to abuse a finger daemon on such a host that allows forwarding.. as users,
  321.  hosts and other network information can be collected to identify easily
  322.  exploitable hosts on the corporate network, the operating system of a
  323.  host can even be determined in many cases by issuing a finger request
  324.  for root@host, bin@host and daemon@host. 
  325.  
  326.  
  327.  Some crackers are now starting to adopt techniques regarding the
  328.  'wardialling' of corporate locations, such as buildings and network
  329.  operation centres.
  330.  
  331.  If a cracker was to find and then compromise a corporate terminal server,
  332.  he would usually have a degree of access to the corporate network, thus
  333.  totally bypassing any firewalls or filters that seperate the corporate
  334.  network from the internet. It is therefore very important to identify
  335.  and ensure the security of your terminal servers, logging of connections
  336.  to such servers is also strongly advised.
  337.  
  338.  
  339.  When trying to understand vulnerabilities in networked systems, a key
  340.  point to remember, is trust between hosts on your network. Either
  341.  through the use of TCP wrappers, hosts.equiv files, .rhosts or .shosts
  342.  files, many larger networks are commonly attacked by exploiting the
  343.  trust between hosts.
  344.  
  345.  For example, if an attacker uses a CGI exploit to view your hosts.allow
  346.  file, he may find that you all connections to your ftp and telnet ports
  347.  from *.trusted.com. Of course, the attacker can then gain access to any
  348.  host at trusted.com, and gain access to your hosts easily.
  349.  
  350.  For these reasons, it is always a good idea to ensure that trusted hosts
  351.  are equally secure from remote attack.
  352.  
  353.  
  354.  One other attack that should be mentioned, is the installation of trojans
  355.  and backdoors on corporate hosts (such as Windows 95/98 machines), if the
  356.  employees have internet access through using an application proxy and a
  357.  firewall, then they will sometimes visit 'warez' sites to download pirated
  358.  software.
  359.  
  360.  Such 'warez' sites usually have screesaver software, and other utilities
  361.  on offer, which in some cases contain trojan horse programs, such as the
  362.  Cult of the Dead Cow's 'Back Orifice' trojan. Upon the installation of
  363.  the screensaver, the trojan infests itself within the machine's registry
  364.  and is run every time the machine boots.
  365.  
  366.  In the case of the BO trojan, plugins can be applied to the trojan to
  367.  make the machine perform certain operations automatically, such as connect
  368.  to IRC servers and join channels, and the like. This can prove very
  369.  dangerous, as a trojaned machine on your corporate network could easily
  370.  be controlled by someone on the internet.
  371.  
  372.  The BO trojan is infinitely more effective if the cracker already has
  373.  access to the corporate network, either because he is an employee or has
  374.  unauthorised access to corporate hosts. The BO trojan could be installed
  375.  on every single Windows 95/98 machine in a matter of weeks if the cracker
  376.  uses the correct strategy, after which he will have total remote control
  377.  over the machines in question, including being able to manipulate files,
  378.  reboot machines and even format drives, entirely remotely.
  379.  
  380.  
  381.  
  382. ------------------------------------------------------------------------------
  383.    3.1  Techniques used to 'cloak' the attackers location
  384. ------------------------------------------------------------------------------
  385.  
  386.  
  387.  Typical crackers will usually use the following techniques to hide
  388.  their true IP address :
  389.  
  390.    - Bouncing through previously compromised hosts via. telnet or rsh.
  391.    - Bouncing through windows hosts via. Wingates.
  392.    - Bouncing through hosts using misconfigured proxies.
  393.  
  394.  
  395.  If such a cracker has a pattern of always scanning your hosts from previously
  396.  compromised machines, wingates or proxies, then it is advisable to contact
  397.  the administrator of the machine by telephone, and notify him of the problems
  398.  in hand. Never e-mail an administrator in such a case, because the cracker
  399.  can simply intercept the e-mail beforehand.
  400.  
  401.  
  402.  The more talented crackers who are skilled in breaking into hosts via.
  403.  telephone exchanges, may use the following techniques :
  404.  
  405.   - Bouncing through '800-number' private telephone exchanges before
  406.     connecting to an ISP using a 'cracked', 'phished' or 'carded' account.
  407.  
  408.   - Connecting to a host by telephone, that is in turn connected to the
  409.     internet.
  410.  
  411.  
  412.  
  413.  Crackers adopting the techniques of bouncing through telephone networks
  414.  before connecting to the internet are extremely hard to track down,
  415.  because they could be literally anywhere in the world. If a cracker
  416.  was to use an '800-number' dialup, he could dial into machines globally
  417.  without having to worry about the cost.
  418.  
  419.  
  420.  
  421. ------------------------------------------------------------------------------
  422.    3.2  Network probing and information gathering
  423. ------------------------------------------------------------------------------
  424.  
  425.  
  426.  Before setting out to attack a corporate network from the internet, a typical
  427.  cracker will perform some preliminary probes of your networks external
  428.  hosts present on the internet. A cracker will attempt to gain external and
  429.  internal hostnames by using the following techniques :
  430.  
  431.    - Using nslookup to perform 'ls <domain or network>' requests.
  432.    - View the HTML on your webservers to identify any other hosts.
  433.    - View the documents on your FTP servers.
  434.    - Connect to your mailservers and perform 'expn <user>' requests.
  435.    - Finger users on your external hosts.
  436.  
  437.  
  438.  Crackers usually attempt to gather information about the layout of your
  439.  network itself first as opposed to identifying specific vulnerabilities.
  440.  
  441.  By looking at results from the queries listed above, it is usually easy
  442.  for a cracker to build a list of hosts and start to understand the
  443.  relationships that exist between them.
  444.  
  445.  When performing these preliminary probes, a typical cracker will make
  446.  very small mistakes and sometimes use his own IP to connect to ports of
  447.  your machines to check operating system versions and other small details.
  448.  
  449.  If your hosts are compromised, it is a good idea to check your FTP and
  450.  HTTPD logs for the presence of any strange requests.
  451.  
  452.  
  453.  
  454. ------------------------------------------------------------------------------
  455.    3.3  Identifying trusted network components
  456. ------------------------------------------------------------------------------
  457.  
  458.  
  459.  Crackers look for trusted network components to attack, a trusted network
  460.  component is usually an administrators machine, or a server that is regarded
  461.  as secure.
  462.  
  463.  A cracker will start out by checking the NFS exports of any of your machines
  464.  running nfsd or mountd, the case being that critical directories on some
  465.  of your hosts (such as /usr/bin, /etc and /home for example) may be
  466.  mountable by such a trusted host.
  467.  
  468.  The finger daemon is often abused to identify trusted hosts and users,
  469.  being users who often log into the machine from specific hosts.
  470.  
  471.  The cracker will then check your machines for other forms of trust, if he
  472.  can exploit a machine using a CGI vulnerability, he may gain access to a
  473.  hosts /etc/hosts.allow file, for example.
  474.  
  475.  After analysing the data from the above checks, the cracker will start
  476.  to identify trust between hosts. The next step for the cracker is to
  477.  identify any trusted hosts that are vulnerable to a remote compromise.
  478.  
  479.  
  480.  
  481. ------------------------------------------------------------------------------
  482.    3.4  Identifying vulnerable network components
  483. ------------------------------------------------------------------------------
  484.  
  485.  
  486.  If a cracker can build lists of your external and internal hosts, he
  487.  will use Linux programs such as ADMhack, mscan, nmap and many smaller
  488.  scanners to scan for specific remote vulnerabilities.
  489.  
  490.  Usuaully such scans of your external hosts will be launched from machines
  491.  on fast fibre-optic connections, ADMhack requires to be run as root on a
  492.  Linux machine, so a cracker will probably use a Linux machine that he has
  493.  gained unauthorised access to and properly installed a 'rootkit' on. Such a
  494.  'rootkit' is used to backdoor critical system binaries to allow unauthorised
  495.  and undetectable access to the host.
  496.  
  497.  The systems administrators of the hosts that are used to scan external
  498.  corporate hosts usually have no idea that scans are being launched from
  499.  their machines, as binaries such as 'ps' and 'netstat' are trojaned to
  500.  hide scanning processes.
  501.  
  502.  
  503.  Other programs such as mscan and nmap don't require to be run as root, and
  504.  so can be launched from Linux (or other platforms in the case of nmap)
  505.  hosts to effectively identify remote vulnerabilities, although these scans
  506.  are slower, and cannot usually be hidden very well (as the attacker doesn't
  507.  need root access to the host as with ADMhack).
  508.  
  509.  
  510.  Both ADMhack and mscan perform the following types of checks on
  511.  remote hosts :
  512.  
  513.   - A TCP portscan of a host.
  514.   - A dump of the RPC services running via. portmapper.
  515.   - A listing of exports present via. nfsd.
  516.   - A listing of shares present via. samba or netbios.
  517.   - Multiple finger requests to identify default accounts.
  518.   - CGI vulnerability scanning.
  519.   - Identification of vulnerable versions of server daemons, including
  520.     Sendmail, IMAP, POP3, RPC status and RPC mountd.
  521.  
  522.  
  523.  Programs such as SATAN are rarely used by crackers nowadays, as they are
  524.  slow.. and scan for outdated vulnerabilities.
  525.  
  526.  After running ADMhack or mscan on the external hosts, the cracker will have
  527.  a good idea of vulnerable or secure hosts.
  528.  
  529.  If routers are present that are SNMP capable, the more advanced crackers
  530.  will adopt agressive-SNMP scanning techniques to try and 'brute force'
  531.  the public and private community strings of such devices.
  532.  
  533.  
  534.  
  535. ------------------------------------------------------------------------------
  536.    3.5  Taking advantage of vulnerable network components
  537. ------------------------------------------------------------------------------
  538.  
  539.  
  540.  So the cracker has identified any trusted external hosts, and also identified
  541.  any vulnerabilities in external hosts. If any vulnerable network components
  542.  were identified, then he will attempt to compromise your hosts.
  543.  
  544.  A patient cracker won't compromise your hosts during normal hours, he will
  545.  usually launch an attack between 9pm in the evening and 6am the next morning,
  546.  this will reduce the likelyhood of anyone knowing about the attack, and give
  547.  the cracker ample time to install backdoors and sniffers on your hosts
  548.  without having to worry about the presence of Systems Administrators.
  549.  
  550.  Most crackers have a great deal of spare time over weekends, and attacks
  551.  are usually launched then.
  552.  
  553.  The cracker will compromise an external trusted host that can be used as
  554.  a point from which to launch an attack on the corporate network. Depending
  555.  on the filtering between the corporate network and the external corporate
  556.  hosts, this technique may or may not work.
  557.  
  558.  If the cracker compromises an external mailserver, which in turn has total
  559.  access to a segment of the internal corporate network, then he can start
  560.  work on embedding himself deeply into your network.
  561.  
  562.  To compromise most networked components, crackers will use programs to
  563.  remotely exploit vulnerable versions of server daemons running on external
  564.  hosts, such examples include vulnerable versions of Sendmail, IMAP, POP3
  565.  and RPC services such as statd, mountd and pcnfsd.
  566.  
  567.  Most remote exploits used by crackers are launched from previously
  568.  compromised hosts, as in some cases they need to be compiled on the same
  569.  platform as the host they are to be used to exploit.
  570.  
  571.  Upon executing such a program remotely to exploit a vulnerable server daemon
  572.  running on your external host, the cracker will usually gain root access to
  573.  your host, which in turn can be abused to gain access to other hosts and
  574.  the corporate network.
  575.  
  576.  
  577.  
  578. ------------------------------------------------------------------------------
  579.    3.6  Upon gain access to vulnerable network components
  580. ------------------------------------------------------------------------------
  581.  
  582.  
  583.  After exploiting a server daemon, the cracker will start a 'clean-up'
  584.  operation of doctoring your hosts logs and 'backdooring' service binaries
  585.  so he can access the host undetected later.
  586.  
  587.  First he will start to implement backdoors, so he can later access the
  588.  host. Most backdoors that crackers use are precompiled, and techniques are
  589.  adopted to change the date and the permissions of the binary that has
  590.  been backdoored, in some cases, even the filesize of the new binary is the
  591.  same as the original binary. Attackers conscious of FTP transfer logs
  592.  may use the 'rcp' program to copy backdoored programs to hosts.
  593.  
  594.  It is unlikely that such a cracker breaking into a corporate network
  595.  will start to patch your hosts from vulnerabilities, he will usually
  596.  only install backdoors and trojan critical system binaries such as 'ps'
  597.  and 'netstat' to hide any connections he may make to and from the host.
  598.  
  599.  The following critical binaries are usually backdoored on Solaris 2.x
  600.  machines :
  601.  
  602.    /usr/bin/login
  603.    /usr/sbin/ping
  604.    /usr/sbin/in.telnetd
  605.    /usr/sbin/in.rshd
  606.    /usr/sbin/in.rlogind
  607.  
  608.  
  609.  Some crackers have also been known to place an .rhosts file in the
  610.  /usr/bin directory to allow remote bin access to the host via. rsh
  611.  and csh in interactive mode.
  612.  
  613.  The next thing that most crackers do is to check the host for any
  614.  presence of logging systems that may have logged his connections to
  615.  the host, he will then proceed to edit such connections out of any
  616.  logs found on the host. It is advisable to log to a lineprinter if
  617.  the machine is very likely to be a prime target of an attack, as
  618.  this makes it extremely difficult for the cracker to edit himself
  619.  from the logs.
  620.  
  621.  Upon ensuring that his presence has not been logged in any way, the
  622.  cracker will proceed to invade the corporate network. Most crackers
  623.  won't bother exploiting vulnerabilities in other external hosts if
  624.  they have access to the internal network.
  625.  
  626.  
  627.  
  628. ------------------------------------------------------------------------------
  629.    4.1  Downloading sensitive information
  630. ------------------------------------------------------------------------------
  631.  
  632.  
  633.  If the cracker's goal is to download sensitive information from FTP servers
  634.  or webservers on the internal corporate network, he can do so from the
  635.  external host that is acting as a 'bridge' between the internet and
  636.  corporate network.
  637.  
  638.  However, if the cracker's goal is to download sensitive information held
  639.  within internally networked hosts, he will proceed to attempt to gain
  640.  access to them by abusing the trust with the external host he already
  641.  has access to.
  642.  
  643.  
  644. ------------------------------------------------------------------------------
  645.    4.2  Cracking other trusted hosts and networks
  646. ------------------------------------------------------------------------------
  647.  
  648.  
  649.  Most crackers will simply repeat the steps taken in sections 3.2, 3.3,
  650.  3.4 and 3.5 to probe and gain access to hosts on the internal corporate
  651.  network, depending on what the cracker is attempting to achieve,
  652.  trojans and backdoors may or may not be installed on your internal
  653.  hosts.
  654.  
  655.  If the cracker wishes to achieve total network access to the hosts on
  656.  the internal network, he will install trojans and backdoors and remove
  657.  logs as in section 3.6. Crackers will also install sniffers on your
  658.  hosts, these are explained in section 4.3.
  659.  
  660.  If the cracker merely wishes to download data from key servers,
  661.  he will take different approaches to gaining access to your hosts,
  662.  such as identifying and attacking key hosts that are trusted by the
  663.  target key servers.
  664.  
  665.  
  666.  
  667. ------------------------------------------------------------------------------
  668.    4.3  Installing sniffers
  669. ------------------------------------------------------------------------------
  670.  
  671.  
  672.  An extremely effective way for crackers to quickly obtain large amounts of
  673.  usernames and passwords for internally networked hosts is to use
  674.  'ethernet sniffer' programs. Because such 'sniffer' programs need to
  675.  operate on the same ethernet as the hosts the cracker wants to gain
  676.  access to, it would be ineffective to run a sniffer on the external host
  677.  he is using as a bridge.
  678.  
  679.  To 'sniff' data flowing across the internal network, the cracker must
  680.  perform a remote root compromise of an internal host that is on the same
  681.  ethernet as a number of other internal hosts. The techniques mentioned
  682.  in sections 3.2, 3.3, 3.4, 3.5 and 3.6 are adopted here, as the cracker
  683.  must compromise and backdoor the host successfully to ensure that the
  684.  sniffer program can be installed and used effectively.
  685.  
  686.  Upon compromising, installing a backdoor and installing trojaned 'ps'
  687.  and 'netstat' programs, the cracker must then install the 'ethernet sniffer'
  688.  program on the host. Such sniffer programs are usually installed in the
  689.  /usr/bin or /dev directories under Solaris 2.x, and then modified to seem
  690.  as if they were installed with all the other system binaries.
  691.  
  692.  Most 'ethernet sniffers' run in the background and output to a log on the
  693.  local machine, it is important to remember that the cracker will usually
  694.  backdoor the 'ps' binary, so the process may not be noticeable.
  695.  
  696.  Such 'ethernet sniffers' work by turning a network interface into
  697.  'promiscuous mode', the interface then listens and logs to the sniffer
  698.  logfile, any useful usernames, passwords or other data that can be used
  699.  by the cracker to gain access to other networked hosts.
  700.  
  701.  Because 'ethernet sniffers' are installed on ethernets, literally any
  702.  data travelling across that network can be sniffed, it doesn't have to
  703.  be travelling to or from the host on which the sniffer is installed.
  704.  
  705.  The cracker will usually return a week later and download the logfile
  706.  created by the 'sniffer' program. In the case of a corporate network
  707.  breach such as this, it is likely that the sniffer will be set up very
  708.  well, and hardly detectable unless a good security policy is implemented.
  709.  
  710.  A very good utility used by many security-conscious Administrators is
  711.  Tripwire, which is available from COAST (see section 5.2). Tripwire
  712.  makes an MD5 'fingerprint' of your filesystem, and will detect any
  713.  modifications to your files made by malicious users or crackers.
  714.  
  715.  To detect promiscuous network interfaces (a common sign of a sniffer
  716.  installation), the 'cpm' tool available from CERT is very useful,
  717.  see http://www.cert.org/ftp/tools/cpm/ for more information.
  718.  
  719.  
  720.  
  721. ------------------------------------------------------------------------------
  722.    4.4  Taking down networks
  723. ------------------------------------------------------------------------------
  724.  
  725.  
  726.  If a cracker can compromise key servers running server applications such
  727.  as databases, network operations systems or any other 'mission critical'
  728.  functions, it is easy for him to take down your network for a period of
  729.  time.
  730.  
  731.  A crude, but not unusual technique adopted by crackers attempting to
  732.  disable network functions, would be to delete all the files from the
  733.  key servers by issuing an 'rm -rf / &' command on the server. Depending
  734.  on the backup system implemented, the system could be for anything from
  735.  hours, to months.
  736.  
  737.  
  738.  If a cracker was to gain access to your internal network, he could abuse
  739.  vulnerabilities present in many routers such as in the Cisco, Bay and
  740.  Ascend brands. In some cases the cracker could restart, or shut down
  741.  routers entirely until an administrator was to reboot them.
  742.  This can cause big problems regarding network functionality,
  743.  as if the cracker was to assemble a list of vulnerable routers that
  744.  performed key networking roles (if they were used on the corporate
  745.  backbone for example), then he could easily disable the corporations
  746.  networking ability for some time.
  747.  
  748.  
  749.  For these reasons, it is very important that 'mission critical' routers
  750.  and servers are always patched and secure.
  751.  
  752.  
  753.  
  754. ------------------------------------------------------------------------------
  755.    5.1  Suggested reading
  756. ------------------------------------------------------------------------------
  757.  
  758.  
  759.  There are many good papers available to help you maintain security of your
  760.  external and internal hosts and routers, we recommend you visit the following
  761.  websites and take a look at the following books if you wish to learn more
  762.  about securing large networks and hosts :
  763.  
  764.   http://www.antionline.com/archives/documents/advanced/
  765.   http://www.rootshell.com/beta/documentation.html
  766.   http://seclab.cs.ucdavis.edu/papers.html
  767.   http://rhino9.ml.org/textware/
  768.  
  769.  
  770.   'Practical Unix & Internet Security'
  771.   ------------------------------------
  772.  
  773.   A good introduction into Unix and Internet security if you really haven't
  774.   read much into the subject before.
  775.  
  776.  
  777.     Simson Garfinkel and Gene Spafford
  778.     O'Reilly & Associates, Inc.
  779.     ISBN 1-56592-148-8
  780.  
  781.     US $39.95  CAN $56.95   (UK around 30 pounds)
  782.  
  783.  
  784.  
  785. ------------------------------------------------------------------------------
  786.    5.2  Suggested tools and programs
  787. ------------------------------------------------------------------------------
  788.  
  789.  
  790.  There are many good free security programs available for common platforms
  791.  such as Solaris, IRIX, Linux, AIX, HP-UX and Windows NT, we recommend you
  792.  take a look at the following websites for information on such free security
  793.  tools :
  794.  
  795.    ftp://coast.cs.purdue.edu/pub/tools/unix/
  796.   http://www.alw.nih.gov/Security/prog-full.html
  797.   http://rhino9.ml.org/software/
  798.  
  799.  
  800.  Network Security Solutions Ltd., is also currently developing a plethora
  801.  of security tools for Unix and Windows based platforms, these will be
  802.  available over the next few months, feel free to visit our site at
  803.  http://www.ns2.co.uk , also look out for free 'lite' versions of our
  804.  software!
  805.  
  806.  
  807.  
  808. ------------------------------------------------------------------------------
  809.  
  810.               Copyright (c) Network Security Solutions Ltd. 1998
  811.                All rights reserved, all trademarks acknowledged
  812.  
  813.  
  814.                            http://www.ns2.co.uk
  815.  
  816.  
  817.              This document may be distributed in the public domain
  818.              as long as the above copyright notices remain intact.
  819.  
  820. ------------------------------------------------------------------------------
  821.  
  822.