Online Book Reader

Home Category

Linux Firewalls - Michael Rash [68]

By Root 467 0
is set in this scan. From the perspective of iptables, the flags imply that either the -sT or -sS command-line arguments were given to Nmap. Finally, logging prefixes are displayed, and in this example, each of the packets from the scan is logged by iptables with a prefix of DROP.

Danger level: [4] (out of 5)

Scanned tcp ports: [1-61440: 1522 packets]

tcp flags: [SYN: 1522 packets, nmap: -sT or -sS]

iptables chain: INPUT (prefix "DROP"), 398 packets

Source and Destination IP Addresses

The source IP address of the scan is next, along with reverse DNS information. By default, psad performs a reverse DNS lookup on offending source IP addresses unless the --no-rdns option is specified on the psad command line. Also included is a passive OS fingerprint that psad derived from the SYN packet (more on this topic in the next chapter), followed by the destination IP address and hostname.

Source: 192.168.10.200

DNS: int_scanner

OS guess: Linux:2.5::Linux 2.5 (sometimes 2.4)

Destination: 192.168.10.1

DNS: iptablesfw

syslog Hostname, Time Interval, and Summary Information

The syslog hostname is included next, and this is mostly useful if the iptables log message originates from a remote syslog server. You can configure syslog to accept log messages from multiple systems that are running iptables, and keeping track of the hostname helps to differentiate psad alerts from multiple systems. Timestamp information is also included so that you know when the psad alert was generated.

Next, if ENABLE_PERSISTENCE is set to Y, the scan information will not time out or be removed from memory as psad runs. The summary information provides the time the source IP address first started behaving suspiciously, the total number of email alerts that psad has sent for the same source IP address, the complete port range that has been scanned since the source IP address attracted attention to itself, and all iptables chains and packet counts associated with the source IP address.

Syslog hostname: iptables

Current interval: Tue Jul 10 12:06:23 2007 (start)

Tue Jul 10 12:06:27 2007 (end)

Overall scan start: Tue Jul 10 12:01:23 2007

Total email alerts: 1

Complete tcp range: [1-65301]

chain: interface: tcp: udp: icmp:

INPUT eth1 3229 0 0

whois Database Information

The last block of information in a psad email alert is the result of a whois query against the source IP address of the scan. The excellent whois client written by Marco d'Itri (see http://www.linux.it/~md/software) is bundled with the psad sources and used by psad for all whois queries. (You can disable whois lookups with the --no-whois command-line argument to psad.) The following information is the whois query result for the source of the scan 192.168.10.200:

OrgName: Internet Assigned Numbers Authority

OrgID: IANA

Address: 4676 Admiralty Way, Suite 330

City: Marina del Rey

StateProv: CA

PostalCode: 90292-6695

Country: US

NetRange: 192.168.0.0 - 192.168.255.255

CIDR: 192.168.0.0/16

NetName: IANA-CBLK1

NetHandle: NET-192-168-0-0-1

Parent: NET-192-0-0-0-0

NetType: IANA Special Use

NameServer: BLACKHOLE-1.IANA.ORG

NameServer: BLACKHOLE-2.IANA.ORG

Comment: This block is reserved for special purposes.

Comment: Please see RFC 1918 for additional information.

Comment:

RegDate: 1994-03-15

Updated: 2002-09-16

OrgAbuseHandle: IANA-IP-ARIN

OrgAbuseName: Internet Corporation for Assigned Names and Number

OrgAbusePhone: +1-310-301-5820

OrgAbuseEmail: abuse@iana.org

OrgTechHandle: IANA-IP-ARIN

OrgTechName: Internet Corporation for Assigned Names and Number

OrgTechPhone: +1-310-301-5820

OrgTechEmail: abuse@iana.org

# ARIN WHOIS database, last updated 2006-06-09 19:10

# Enter ? for additional hints on searching ARIN's WHOIS database.

psad syslog Reporting

In addition to email alerting, syslog is an important reporting mechanism for psad. During the course of normal operations, psad generates three categories of syslog alerts.

Informational Messages

Periodically, psad generates informational syslog messages that are designed to inform

Return Main Page Previous Page Next Page

®Online Book Reader