http://www.Linux-Sec.net




  • Hardening-Tightening

    Security_Policy

  • Hardening-HOWTO

    Linux Distros

    Distro Patches

    Kernel-Patches

    Dedicated Servers
  • Firewalls
  • DNS Servers
  • Mail Servers
  • Web Servers

    Turn-Off Daemons

    Tighten Inetd Services


  • Top-10 Vulnerabilities

    Top-7 Security Mistakes

    Top-10 Vulnerabilities

    Top-20 Most Critical Vulnerability


    Top-10 Virus


  • Scans/Attacks Stats

    Top-10 Attacks

    Hacked Servers


  • One Minute Audits
  • OpenPorts Audit


    AntiVirus - AntiSpam
  • Anti-Spam
  • Anti-Virus

  • spam.wav


    Wireless [In]Security
  • Sniffers


  • Security Tools

    SSH_SSL

    Firewalls

    MailServer

    FileSystem

    VPN

    Port Scan Detectors

    IDS Tools

    LogFile Analysis

    Ethernet Monitoring

    Server Monitoring

    Tracking & Forensics


  • Hackers Tools

    Audit Tools

    Port Scanners

    Hacking Tools

    DDOS Tools

    Sniffer Tools

    Spoof Tools

    Exploits & Vulnerbilities


  • Wireless

    Wireless [In]Security


  • Misc

    Statistics

    Linux/BSD Distros

    Links,Articles,WatchDogs

    Security Mailing Lists/FAQs

    Liability Insurance



  • 1U Rackmount Chassis

    Custom-Chassis.com

    Linux-1U.net

    1U-ITX.net


    ITX-Blades.net


    Small PC cases

    Mini-Box.net

    Wrap-Box.net

    Wrap-OS.net


    Wan-Sim.net



    Linux-Consulting.com

    Linux-CAE.net

    Linux-Sec.net

    Linux-Boot.net

    Linux-Backup.net

    Linux-Wireless.org

    Linux-Office.net

    Linux-Video.net

    Linux-VOIP.net

    Linux-Jobs.net

    Linux-Diff.net

    1U-Raid5.net

    Linux-Howto.net


    Spam Reporting



    Free Linux CDs

    ISO9660.org

    Distro-CD.org

    Patch-CD.org




    Contact



    Linux is a registered trademark of
    Linus Torvalds

    More Linux Legalese


    Tracking, Tracing, Cleanup


    Minimum Tracking and Forensics
    • Before Powering down your hacked server
      • Save a copy of the current state of the hacked disk
        • tar zcvf /mnt/safe_place/hacked_version.tgz /hacked_disk/{bin,sbin,boot,root,dev,lib,etc,usr,var,tmp...}
        • tar zcvf /mnt/safe_place/home_data.tgz /hacked_disk/home ..

      • Save the info in your kernel's memory
        • tar zcvf /mnt/safe_place/proc.tgz /proc

    • After Powering down your hacked server
      • lots of critical information is lost
      • temporary data in swap, kernel memory and tmp space is lost
      • connections to the hackers sites will be lost
      • re-attempts to connect from the [cr/h]acker will be lost
      • Perform Forensics from a standalone cdrom
        • Boot linux from a live boot cdrom and mount the "hacked disk"

      • Re-Install on a NEW disk
        • Install a new distro from CDROMs only
        • use a brand new disks because
          • its cheap and the new disks will probably have more disk capacity now
          • your backups MIGHT not have all the user data you need
          • you may or may not be able to identify all the things the hacker did to your disk
          • the linux distro of your choice might have the old bugs and vulnerabilities fixed

      • Apply all upgrades and patches for your distro
        • Audit your server more carefully and more throughly
        • Save a copy of the system BEFORE you go back online

      • It's tricky business to identify and remove all binaries/backdoors/directories/files installed by the hacker
        • Use commands from a standalone live cdrom

      • Get your users back online with their "data" from backups
        • Verify that the user did NOT open a door for the hackers to come in
        • Restore USER data from backup
        • Do NOT restore binaries from backup

      • Now that you got the users back online, poke around on the hacked disks
        • You need to see how they got in
        • You need to see what they changed
        • You need to know what ip# they came from
        • You need to know if they sniffed your network for passwds and other corp data

      • Change the way you do things... to prevent the "next time"

    PostMortems

    Tracking and Tracing Tools
    • To Find out what has changed on your "hacked system"
      • Your IDS will tell you what was changed

      • You can run "find" ( assuming it is a clean version and clean libraries )
        • Look for files that was changed in the last 3 days
          ( use -7 if you want to check the last 7 days )
        • find / -mtime -3 -ls | grep -v /proc
        • your should be able to explain every directory and file that is listed

    • Binaries tend to be replaced ... you need to find a "clean version" ( bootable cdrom )
        nslookup
        dig
        fuser -muvn port#
        netstat -napv
        lsof

        lsof

        ps, top, find
        ifconfig, route, ping, traceroute
        last, who, w
        login, passwd, bash, perl, sum, md5
        tar, rpm, make, gcc
        mail, elm, pine, sendmail
        SynScan.nss.nu ARP Ping
        habets.pp.se/synscan ARP Ping

        they change/modify various libraries too

    Forensics

    Evidence


    Copyright © 2000
    Linux-Consulting
    All Rights Reserved.
    Updated: Mon Aug 29 20:32:58 2005 PDT