2009-04-21

Wireless Range Extender

Linksys WRE54G Wireless Range Expander
Linksys WRE54G Wireless Range Expander
A wireless range extender increases the distance over which a WLAN signal can spread, overcoming obstacles and enhancing overall network signal quality. Several different forms of wireless range extenders are available. These products are sometimes called "range expanders" or "signal boosters." The Linksys WRE54G (compare prices) 802.11g Wireless Range Expander is shown above. A wireless range extender works as a relay or network repeater, picking up and reflecting WiFi signals from a network's base router or access point. The network performance of devices connected through a range extender will generally be lower than if they were connected directly to the primary base station.
A wireless range extender connects wirelessly to a WiFi router or access point. However, due to the nature of this technology, most wireless range extenders work only with a limited set of other equipment. Check the manufacturer's specifications carefully for compatiblity information.

Wireless Internet Video Cameras

Linksys WVC54G Wireless Internet Video Cameralinksys.com
A wireless Internet video camera allows video (and sometimes audio) data to be captured and transmitted across a WiFi computer network. Wireless Internet video cameras are available in both 802.11b and 802.11g varieties. The Linksys WVC54G (compare prices) 802.11g wireless camera is shown above.
Wireless Internet video cameras work by serving up data streams to any computer that connects to them. Cameras like the one above contain a built in Web server. Computers connect to the camera using either a standard Web browser or through a special client user interface provided on CD-ROM with the product. With proper security information, video streams from these cameras can also be viewed across the Internet from authorized computers.
Wi-Fi Internet video cameras can be connected to a wireless router using either an Ethernet cable or wirelessly. These products include setup software on a CD-ROM that must be installed on one computer to complete initial Wi-Fi configuration of the device.
Features that distinguish different wireless Internet video cameras from each other include:
resolution of the captured video images (for example, 320x240 pixel, 640x480 pixel, and other image sizes)
motion sensors, and the ability to send email alerts when new activity is detected and captured
ability to timestamp images
built-in microphones and/or jacks for external microphones, for audio support
types of WiFi security supported, such as WEP or WAP

Wireless Game Adapters

A wireless game adapter connects a video game console to a Wi-Fi home network to enable Internet or head-to-head LAN gaming. Wireless game adapters for home networks are available in both 802.11b and 802.11g varieties. An example of an 802.11g wireless game adapter appears above, the Linksys WGA54G (compare prices). Wireless game adapters can be connected either to a wireless router using an Ethernet cable (for best reliability and performance) or over Wi-Fi (for greater reach and convenience). Wireless game adapter products include setup software on a CD-ROM that must be installed on one computer to complete initial configuration of the device. As with generic network adapters, wireless game adapters must be configured with the correct network name (SSID) and encryption settings.
A wireless print server allows one or two printers to be conveniently shared across a WiFi network. Wireless print servers for home networks generally are available in both 802.11b and 802.11g varieties. Wireless print servers offer the following advantages:
Allows printers to be conveniently located anywhere within wireless network range, not tied to the location of computers Does not require a computer be always turned on in order to print Does not require a computer to manage all print jobs, that can bog down its performance Allows administrators to change computer names and other settings without having to re-configure the network printing settings. A wireless print server must be connected to printers by a network cable, normally USB 1.1 or USB 2.0. The print server itself can connect to a wireless router over WiFi, or it can be joined using an Ethernet cable.
Most print server products include setup software on a CD-ROM that must be installed on one computer to complete the initial configuration of the device. As with network adapters, wireless print servers must be configured with the correct network name (SSID) and encryption settings. Additionally, a wireless print server requires client software be installed on each computer needing to use a printer.
The Linksys WPS54G (compare prices) 802.11g USB wireless print server is shown. Print servers are very compact devices that include a built-in wireless antenna and LED lights to indicate status.

Wireless Network Adapters

A wireless network adapter allows a computing device to join a wireless LAN. Wireless network adapters contain a built-in radio transmitter and receiver. Each adapter supports one or more of the 802.11a, 802.11b, or 802.11g Wi-Fi standards. Wireless network adapters also exist in several different form factors. Traditional PCI wireless adapters are add-in cards designed for installation inside a desktop computer having a PCI bus. USB wireless adapters connect to the external USB port of a computer. Finally, so-called PC Card or PCMCIA wireless adapters insert into a narrow open bay on a notebook computer.
One example of a PC Card wireless adapter, the Linksys WPC54G (compare prices) is shown above. Each type of wireless network adapter is small, generally less than 6 inches (0.15 m) long. Each provides equivalent wireless capability according to the Wi-Fi standard it supports.
Some notebook computers are now manufactured with bulit-in wireless networking. Small chips inside the computer provide the equivalent functions of a network adapter. These computers obviously do not require separate installation of a separate wireless network adapter.

Wireless Access Points

A wireless access point (sometimes called an "AP" or "WAP") serves to join or "bridge" wireless clients to a wired Ethernet network. Access points centralize all WiFi clients on a local network in so-called "infrastructure" mode. An access point in turn may connect to another access point, or to a wired Ethernet router. Wireless access points are commonly used in large office buildings to create one wireless local area network (WLAN) that spans a large area. Each access point typically supports up to 255 client computers. By connecting access points to each other, local networks having thousands of access points can be created. Client computers may move or "roam" between each of these access points as needed.
In home networking, wireless access points can be used to extend an existing home network based on a wired broadband router. The access point connects to the broadband router, allowing wireless clients to join the home network without needing to rewire or re-configure the Ethernet connections.
As illustrated by the Linksys WAP54G (compare prices) shown above, wireless access points appear physically similar to wireless routers. Wireless routers actually contain a wireless access point as part of their overall package. Like wireless routers, access points are available with support for 802.11a, 802.11b, 802.11g or combinations.

How Can the Range of a WiFi Network Be Boosted?

Question: How Can the Range of a WiFi Network Be Boosted?
You can boost the signal range of a WiFi computer network in several ways:
Answer:
reposition your router (or access point) to avoid obstructions and radio interference. Both reduce the range of WiFi network equipment. Common sources of interference in residences include brick or plaster walls, microwave ovens, and cordless phones. Additionally, consider changing the WiFi channel number on your equipment to avoid interference.
upgrade the antenna on your router (or access point). WiFi antennas on most wireless base stations can be removed and replaced with more powerful ones.
add another access point (or router). Large residences typically require no more than two APs, whereas businesses may employ dozens of APs. In a home, this option requires connecting your primary wireless router (access point) to the second one with Ethernet cable; home wireless routers and/or APs don't normally communicate with each other directly.
add a bi-directional WiFi signal amplifier to wireless devices as needed. A WiFi signal amplifier (sometimes called "signal booster") attaches to a router, access point or Wi-Fi client at the place where the antenna connects. Bi-directional antennas amplify the wireless signal in both transmit and receive directions. These should be used as WiFi transmissions are two-way radio communications.
add a WiFi repeater. A wireless repeater is a stand-alone unit positioned within range of a wireless router (access point). Repeaters (sometimes called "range expanders") serve as a two-way relay station for WiFi signals. Clients too far away from the original router / AP can instead associate with the WLAN through the repeater.

Hybrid Ethernet Router / Wireless Access Point Network Diagram

Key Considerations - Most (but not all) wired network routers allow up to four devices to be connected via Ethernet cable. A wireless access point consumes one of these available ports, but it then enables many (dozens of) WiFi devices to join the network. Nearly any home network wireless access point will have no issue managing to support the number of wireless devices there. However, if all WiFi computers attempt to use the network at the same time, performance slowdowns can result.
All devices connecting to an Ethernet router must possess a working Ethernet network adapter. All devices connecting a wireless access point must possess a working WiFi network adapter.
Optional Components - Networking of Internet access, printers, game consoles and other entertainment devices is not required for either the router or access point to function. Simply omit any of these components shown that do not exist in your layout.
You can choose which devices to connect to the router and which to the wireless access point. Additional network adapters may be needed to convert some Ethernet devices, particularly printers and game consoles, to work wirelessly.
Limitations - The WiFi portion of the network will function only to the limit of the wireless access point's range. The range of WiFi equipment varies depending on many factors including layout of the home and any radio interference that may be present.
If the wireless router does not support enough Ethernet connections, add a secondary device like a network switch to expand the wired portion of the layout.

How to Optimally Position a Wireless Access Point or Router

The performance of a Wi-Fi home network greatly depends on signal strength of the wireless router or wireless access point (base station). If a given wireless client falls out of range of the base station signal, obviously that network connection will fail or "drop." Clients situated near the edge of the network range will likely experience intermittent dropped connections. But even when a wireless client stays within range consistently, its network performance can still be adversely affected by distance, obstructions, or interference.
To position your wireless equipment for optimal network performance, follow these guidelines:
First and foremost, don't settle prematurely on a location for the wireless access point or router. Experiment; try placing the device in several different promising locations. While trial-and-error may not be the most scientific way to find a good spot for your equipment, it is often the only practical way to assure the best possible Wi-Fi performance.
Strive to install the wireless access point or router in a central location. If you have only one wireless client, installing the base station near this client is best. For WLANs with multiple wireless clients, find a good compromise position. Clients too far away from the base station will manage only 10% - 50% the bandwidth of clients nearby to it. You might need to sacrifice the network performance of one client for the good of the others.
Next, avoid physical obstructions whenever possible. Any barriers along the "line of sight" between client and base station will degrade a Wi-Fi radio signal. Plaster or brick walls tend to have the most negative impact, but really any obstruction including cabinets or furniture will weaken the signal to some degree. Obstructions tend to reside closer to floor level; therefore, some folks prefer to install their wireless access point / router on or near the ceiling.
Avoid reflective surfaces whenever possible. Some Wi-Fi signals literally bounce off of windows, mirrors, metal file cabinets and stainless steel countertops, lessening both network range and performance.
Install the wireless access point or router at least 1 m (3 feet) away from other home appliances that send wireless signals in the same frequency range. Such appliances include some microwave ovens, cordless telephones, baby monitors, and home automation equipment like X-10 devices. Any appliance that transmits in the same general range as 802.11b or 802.11g (2.4 GHz) can generate interference.
Likewise, install the unit away from electrical equipment that also generates interference. Avoid electric fans, other motors, and flourescent lighting.
If the best location you find is only marginally acceptable, consider adjusting the base station antennas to improve performance. Antennas on wireless access points and routers can usually be rotated or otherwise re-pointed to "fine tune" Wi-Fi signalling. Follow the specific manufacturer's recommendations for best results. If using these guidelines you still cannot find a suitable location for your wireless gear, there are alternatives. You can, for example, replace and upgrade the base station antenna. You can also install a Wi-Fi repeater (often called a "range extender" or "signal booster.") Finally, in extreme cases, you may need to configure a second base station to extend the range of your WLAN. Next > Boost the Range of Your WiFi Network
More Wireless / Networking Quick Tips

IEEE 802.11

The 802.11 family includes over-the-air modulation techniques that use the same basic protocol. The most popular are those defined by the 802.11b and 802.11g protocols, and are amendments to the original standard. 802.11-1997 was the first wireless networking standard, but 802.11b was the first widely accepted one, followed by 802.11g and 802.11n. Security was originally purposefully weak due to export requirements of some governments,[1] and was later enhanced via the 802.11i amendment after governmental and legislative changes. 802.11n is a new multi-streaming modulation technique that is still under draft development, but products based on its proprietary pre-draft versions are being sold. Other standards in the family (c–f, h, j) are service amendments and extensions or corrections to previous specifications.
802.11b and 802.11g use the 2.4 GHz ISM band, operating in the United States under Part 15 of the US Federal Communications Commission Rules and Regulations. Because of this choice of frequency band, 802.11b and g equipment may occasionally suffer interference from microwave ovens, cordless telephones and Bluetooth devices. Both 802.11 and Bluetooth control their interference and susceptibility to interference by using spread spectrum modulation. Bluetooth uses a frequency hopping spread spectrum signaling method (FHSS) while 802.11b/g use the direct sequence spread spectrum signaling (DSSS) and orthogonal frequency division multiplexing (OFDM) methods respectively. 802.11a uses the 5 GHz U-NII band, which, for much of the world, offers at least nineteen non-overlapping channels rather than the three offered in the 2.4 GHz ISM frequency band.[2] However propagation around objects such as walls and furniture tends to be better at higher frequencies[citation needed]. This is because higher frequencies scatter more which helps them get around objects[citation needed]. However penetration is better with lower frequencies. You may get better or worse performance with higher or lower frequencies (channels) depending on your environment. WiFi generally reflects around objects rather than going through them.
The other major factor in performance is absorption by water and moisture. 2.4GHz is very close to the O-H bond frequency. Water is full of O-H bonds so it tends to really absorb 2.4GHz WiFi signals. Higher and lower frequencies have less of a problem with this.
The segment of the radio frequency spectrum used varies between countries। In the US, 802.11a and 802.11g devices may be operated without a license, as allowed in Part 15 of the FCC Rules and Regulations. Frequencies used by channels one through six (802.11b) fall within the 2.4 GHz amateur radio band. Licensed amateur radio operators may operate 802.11b/g devices under Part 97 of the FCC Rules and Regulations, allowing increased power output but not commercial content or encryption.[3]
802.11-1997 (802.11 legacy)Main article: IEEE 802.11 (legacy mode)The original version of the standard IEEE 802.11 was released in 1997 and clarified in 1999, but is today obsolete. It specified two net bit rates of 1 or 2 megabits per second (Mbit/s), plus forward error correction code. It specifed three alternative physical layer technologies: diffuse infrared operating at 1 Mbit/s; frequency-hopping spread spectrum operating at 1 Mbit/s or 2 Mbit/s; and direct-sequence spread spectrum operating at 1 Mbit/s or 2 Mbit/s. The latter two radio technologies used microwave transmission over the Industrial Scientific Medical frequency band at 2.4 GHz. Previous WLAN technologies used lower frequencies, such as the U.S. 900 MHz ISM band.
Legacy 802.11 with direct-sequence spread spectrum was rapidly supplemented and popularized by 802.11b.

2009-04-09

Single Snort IDS (with Web Interface)

Snort IDS (with web interface)


Written by Graham Mead


Click here to read in wide screen!


Abstract

This guide will be a snort set up with an administrative front end. Snort will be implemented in this manner so it can easily installed and maintained. This configuration is only for use on one local system as it bypasses a lot of security features that would be required for external access. This install is intended to be used to develop snort rules but it could also be used for monitoring a home network.



  • Setting up MySQL
  • Apache and PHP
  • Basic Analysis and Security Engine
  • Installing Oinkmaster
  • Bleeding Edge Rules
  • Installing Snort from source (Recomended)
  • Installing Snort (Ubuntu binary version)
  • Configuring Snort
  • Installing Oinkmaster




Software Used

Base system: Ubuntu 8.10

Installed from the Ubuntu package manager:

MySQL, Apache HTTP Server, PHP, Oinkmaster, Snort.



Downloaded from sites as source.

BASE and Snort.



How it works

The Snort service would listen to a network interface for traffic it thinks are attacks. Once an attack has been detected Snort would create an alert which would then be up loaded to a SQL server installed on the local system. The web interface (BASE) would then be able to display and manage the alerts in the database.




Set up MySQL

The first stage is to set up the database server so both Snort and BASE can connect and store/retrieve alerts. First we have to install the MySQL server (which in Ubuntu is MySQL 5). The input is marked as bold text.

$ sudo apt-get install mysql-server mysql-client



This section is a little ugly as I don't really speak SQL very well. We will be setting up two databases, the 'snort' and the 'archive' database. For the snort alerts database the username is 'snort', the password is 'snortconfpasswd' and the database name is also 'snort'. For the archive database the username is 'archive', the password is 'archiveconfpasswd' and the database name is again also 'archive'.



Snort Database

$ mysql -u root -p

mysql> CREATE DATABASE snort;

mysql> grant INSERT,SELECT,UPDATE,CREATE,DELETE on snort.* to snort;

mysql> grant INSERT,SELECT,UPDATE,CREATE,DELETE on snort.* to snort@localhost;

mysql> SET PASSWORD FOR snort=PASSWORD('snortconfpasswd');

mysql> SET PASSWORD FOR snort@localhost=PASSWORD('snortconfpasswd');

mysql> flush privileges;

mysql> exit



Archive Database

$ mysql -u root -p

mysql> CREATE DATABASE archive;

mysql> grant INSERT,SELECT,UPDATE,CREATE,DELETE on archive.* to archive;

mysql> grant INSERT,SELECT,UPDATE,CREATE,DELETE on archive.* to archive@localhost;

mysql> SET PASSWORD FOR archive=PASSWORD('archiveconfpasswd');

mysql> SET PASSWORD FOR archive@localhost=PASSWORD('archiveconfpasswd');

mysql> flush privileges;

mysql> exit



We then install the schema from the Snort download, the schema file is located in the schema folder of the downloaded archive. Then we import the database schema by issuing the following command in the schema directory.

$ cat create_mysql mysql -u snort -D snort -p



Or if Snort (snort-mysql) was downloaded from the Ubuntu repos.

$ zcat /usr/share/doc/snort-mysql/create_mysql.gz mysql -u snort -D snort -p



Check Database was created correctly.

$ mysql -u root -p

mysql> show databases;

mysql> use snort



A fast way of checking that the schema was imported is to check the tables were created in the Snort database, naturally this only works for a new install. You should see something like this if was successful.

mysql> show tables;


+------------------+

Tables_in_snort

+------------------+

data

detail

encoding

event

icmphdr

iphdr

opt

reference

reference_system

schema

sensor

sig_class

sig_reference

signature

tcphdr

udphdr

+------------------+

16 rows in set (0.00 sec)


Then we check that the Snort user has a password set and has the correct permissions by issuing the below command. Its worth noting that the percentage symbol is a wildcard in MySQL, so snort@% would be accepted from anywhere on the network interface.

mysql> show grants for 'snort';

+------------------------------------------------------------------------------------------------------+

Grants for snort@%

+------------------------------------------------------------------------------------------------------+

GRANT USAGE ON *.* TO 'snort'@'%' IDENTIFIED BY PASSWORD '*461162D3DA0A6C03D88954BE694A7D05FC8AB884'

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE ON `snort`.* TO 'snort'@'%'

+------------------------------------------------------------------------------------------------------+

2 rows in set (0.00 sec)

mysql> exit



After any changes to the configuration 'my.cnf' we need to restart the MySQL service.

$ sudo /etc/init.d/mysql restart



Apache and PHP

BASE requires a PHP capable web server, Apache will be used in this example. The following installs the apache2 web server, PHP5 (the apache module), the ADOdb database abstraction library and the PHP PEAR mail modules for BASE to work properly.



$ sudo apt-get install apache2 php5-mysql libphp-adodb php-mail-mime php-mail



First we change into the web server root directory and delete the default "It Works!" page and replace it with a PHP version.

$ cd /var/www/

$ sudo rm index.html

$ sudo nano index.php



Then we enter this PHP test code into the newly created file:

<?php echo "PHP WORKS";?>


Set the Apache bind address to the loopback address (127.0.0.1) so that the web server is only visible on the local computer.


$ sudo nano /etc/apache2/ports.conf

Listen 127.0.0.1:80



We have just changed the normal HTTP port and just to be safe we will also change the SSL port so if we accidentally enable SSL, BASE will not exposed.



<IfModule mod_ssl.c>

Listen 127.0.0.1:443

</IfModule>


To enable the PHP module on Debain/Ubuntu you would run the following:

$ a2enmod php5

Module php5 already enabled


If you get the above message about the PHP module already being enabled all you need to do is to restart Apache. After we change the address that Apache listening on we need to restart Apache.

$ sudo /etc/init.d/apache2 restart



Then use a web browser and browse to the web server at 127.0.0.1, "PHP WORKS" should be displayed if PHP is working.



Basic Analysis and Security Engine

BASE is the PHP script that is used to monitor and manage Snort alerts. We need to download and extract the archive.


This command will copy BASE into the web server root overwriting the old 'index.php' file.

$ sudo cp -R ~/Desktop/base-php4/* /var/www/



We change the web server root so that it is owned (thus writable) by the web server user so the configuration file for BASE can be written to disk. After the setup has finished and the configuration is installed don't forget to change back the permissions.

$ sudo chown www-data /var/www/



Browse to the web server and follow the on screen instructions to start the setup process. The first part of the setup is where BASE checks the settings are fine for BASE to operate with any problems being displayed in red.

The second page of the setup is where BASE asks for the path of the ADodb library that was installed along side Apache.





The next page is where the database connection information is entered.

After the SQL information has been entered we have the option to enable an authentication system build into BASE.

BASE database Schema

Once BASE can connect to the Snort database, there will be an error saying that the BASE tables are not installed.

The database version is valid, but the BASE DB structure (table: acid_ag)is not present. Use the Setup page to configure and optimize the DB.



Click on the setup page and then click the button to create the BASE tables. After this is done there will be another message. In order to support Alert purging (the selective ability to permanently delete alerts from the database) and DNS/whois lookup caching, the DB user "snort" must have the DELETE and UPDATE privilege on the database. We have set up the Snort user with update and delete privileges.


After these stages you should be able to access BASE via a web browser by entering 'http://127.0.0.1/' into the address bar. The build in authentication can be used to provide a layer of security however only user that can access the local system can access BASE.



Installing Oinkmaster

Oinkmaster is a perl script that helps administrators update and manage Snort rules. An Oinkcode can be obtained by registering on the snort website and entering your profile, here there will be an option to generate your Oinkcode.



First we install Oinkmaster.

$ sudo apt-get install oinkmaster



Then we edit the Oinkmaster config file to use an Oinkcode.

$ sudo nano /etc/oinkmaster.conf



We then must comment out any 'url=' lines like the one below and add a line for the Oinkcode.

#url = http://www.snort.org/dl/rules/snortrules-snapshot-*.tar.gz

url = http://www.snort.org/pub-bin/oinkmaster.cgi/<oinkcode>/snortrules-snapshot-2.8.tar.gz



Or add this this line if you want to install the current rule snapshot.

url = http://www.snort.org/pub-bin/oinkmaster.cgi/<oinkcode>/snortrules-snapshot-CURRENT.tar.gz



This is how the URL is formed.

http://www.snort.org/pub-bin/oinkmaster.cgi/<oinkcode>/snortrules-snapshot-<major version>.<minor version>.tar.gz



Then we add this line to the oinkmaster.conf file so Oinkmaster will manage both the official Snort rules and the emerging edge rules.

url = http://www.bleedingthreats.net/rules/emerging.rules.tar.gz



We make the directory for the Snort rules and backups to be stored in.

$ sudo mkdir -p /etc/snort/rules

$ sudo mkdir -p /etc/snort/backup



Then we change the owner of the Snort directory to the 'snort' user.

$ sudo chown -R snort:snort /etc/snort/



Emerging Threats Rules

The emerging threats rules are a set of Snort rules developed by the community.

Create the emerging.conf in the same directory as the Snort config file.



Add the following to the rules section of snort.conf

include emerging.conf



Add the following to the emerging rules conf file to enable the rules. Make sure there are no BLOCK or .xml files listed or enabled.

include $RULE_PATH/emerging-attack_response.rules

include $RULE_PATH/emerging-dos.rules

include $RULE_PATH/emerging-exploit.rules

include $RULE_PATH/emerging-game.rules

include $RULE_PATH/emerging-inappropriate.rules

include $RULE_PATH/emerging-malware.rules

include $RULE_PATH/emerging-p2p.rules

include $RULE_PATH/emerging-policy.rules

include $RULE_PATH/emerging-scan.rules

include $RULE_PATH/emerging-virus.rules

include $RULE_PATH/emerging-voip.rules

include $RULE_PATH/emerging-web.rules

include $RULE_PATH/emerging-web_sql_injection.rules

include $RULE_PATH/emerging.rules

include $RULE_PATH/emerging-drop.rules

include $RULE_PATH/emerging-rbn.rules

include $RULE_PATH/emerging-compromised.rules

include $RULE_PATH/emerging-botcc.rules

include $RULE_PATH/emerging-dshield.rules



Rules would be enabled and disabled via Oinkmaster with the 'enablesid' and 'disablesid' statements.

disablesid 1,3,4

enablesid 2



Finally we run Oinkmaster manually to install the rules.

$ sudo oinkmaster -o /etc/snort/rules/ -b /etc/snort/backup



Emailing the output of Oinkmaster's updates to the rules is possible but its outside the scope of this guide.


Installing Snort from source (Recommend)

First thing we have to do is install the software that we need to build Snort from the source code.

$ sudo apt-get install build-essential libpcap0.8-dev libmysqlclient15-dev bison flex libc6-dev g++ gcc pcregrep libpcre3-dev



Then we obtain the latest stable version (which was snort-2.8.3.2 at time of writing) and extract the archive.

$ wget http://www.snort.org/dl/snort-2.8.3.2.tar.gz

$ tar zxvf snort-2.8.3.2.tar.gz



The install notes for Snort are held in the doc sub directory and lists all the configure options. All these commands are run from the Snort source code directory.



$ ./configure --enable-dynamicplugin --with-mysql



Then we compile the software and install it to the system.

$ make

$ sudo make install



I had a compile time error with ubuntu 8.10 but a quick trip to the linuxforums.org I managed to fix the problem.



Next we add a user account for Snort so that it's not running as the root user. Any password can be used as the account will be locked anyway. We need to set the shell to '/bin/true' which does nothing.

$ sudo adduser snort

$ sudo chsh snort

$ sudo passwd snort -l



Finally we create some of the directories that Snort need to run and assign the correct permissions.


$ sudo mkdir -p /etc/snort/rules /etc/snort/backup /var/log/snort


$ sudo chown -R root:snort /var/log/snort

$ sudo chmod -R 770 /var/log/snort


We need to copy the etc directory from the source tarball to the local install's config directory.


$ sudo cp <snortSRC>/etc/* /etc/snort/


Then we need to write/install a boot script. I'm using the script written by bodhi.zazen from the Ubuntu forums. Then after the boot script is installed to the system we add the following line to the /etc/rc.local file before any 'exit 0' statements so Snort will be started at boot time. We also need to make the script executable before it can be run.


$ sudo cp ubuntu.snort.init.txt /etc/init.d/snort


$ sudo chmod +x /etc/init.d/snort


$ sudo nano /etc/rc.local


exec /etc/init.d/snort boot


Installing Snort (Ubuntu's binary version)

Ubuntu installed from the package manager. This should only be used if the Install from source fails and you can't fix it.

$ sudo apt-get install snort-mysql



After you run this, the installer will ask you to configure the HOME_NET, this should be set to your network mask. Apport will most likely pop up telling you that Snort has crashed, this is unlikely the case as the Snort (with MySQL) version in Ubuntu comes with a block that stops it from starting until an output source has been configured. To see the error message, you would try to start Snort with the init script that comes with the Ubuntu package.

$ sudo /etc/init.d/snort start


Configuring Snort

First we need to copy the config file in case we make a lot of mistakes.

$ sudo cp /etc/snort/snort.conf /etc/snort/snort.conf.org



Then we edit the main Snort configuration file.

$ sudo nano /etc/snort/snort.conf



We set the HOME_NET variable to the network address with network mask.

var HOME_NET [192.168.58.0/24]

var EXTERNAL_NET !$HOME_NET



This line sets the base path for the rules files which are listed at the bottom of the config file.

var RULE_PATH /etc/snort/rules



This is an important option to uncomment if your computer has low memory, as with all most of the standard rules and the emerging threats rules on my test computer it used 558.78 Mbytes of memory on one interface. However with this option enabled it used about 15 Mbytes. On a system with large amounts of memory like a dedicated Sensor higher performance can be gained by keeping it commented out.

config detection: search-method lowmem



The output database line should be configured for now, so we can see that everything is working. Unless barnyard is to be used, then see below.

output database: log, mysql, user=snort password=snortconfpasswd dbname=snort host=127.0.0.1



These following options are only used by Debian systems (Ubuntu packages). Most of these are defaults and they should stay that way. However you should configure the HOME_NET line and make sure that Snort is listening on the correct interface if you have more than one.

$ sudo nano /etc/snort/snort.debian.conf

DEBIAN_SNORT_STARTUP="boot"

DEBIAN_SNORT_HOME_NET="192.168.58.0/24"

DEBIAN_SNORT_OPTIONS=""

DEBIAN_SNORT_INTERFACE="eth1"

DEBIAN_SNORT_SEND_STATS="true"

DEBIAN_SNORT_STATS_RCPT="root"

DEBIAN_SNORT_STATS_THRESHOLD="1"



Once the basic configuration has been done we check to see if Snort has any problems with it by running the following command. If all goes well you should see something similar to the output below.

$ sudo snort -c /etc/snort/snort.conf

....

--== Initialization Complete ==--



,,_ -*> Snort! <*-

o" )~ Version 2.7.0 (Build 35)

'''' By Martin Roesch & The Snort Team: http://www.snort.org/team.html

(C) Copyright 1998-2007 Sourcefire Inc., et al.



Rules Engine: SF_SNORT_DETECTION_ENGINE Version 1.6 <Build 11>

Preprocessor Object: SF_SMTP Version 1.0 <Build 7>

Preprocessor Object: SF_DCERPC Version 1.0 <Build 4>

Preprocessor Object: SF_FTPTELNET Version 1.0 <Build 10>

Preprocessor Object: SF_SSH Version 1.0 <Build 1>

Preprocessor Object: SF_DNS Version 1.0 <Build 2>

...



If Snort does find any errors in the configuration, it will exit to the user prompt with the error just above it. The following example is when the MySQL logging is configured but the MySQL server has not been started or can't be contacted.

ERROR: database: mysql_error: Can't connect to MySQL server on '192.168.58.13' (113)

Fatal Error, Quitting..



Restart Snort every 6 hours

We have to restart Snort every few hours because the database connection can timeout if no traffic has been received for a while. Yes this is a bad thing and is a big problem with a well tuned sensor that has few false positives (normal traffic being detected as an attack). It's also used to automatically get Snort to reload the rules so any new ones will be loaded.


$ sudo crontab -e

20 0,6,12,18 * * * /etc/init.d/snort restart >/dev/null 2>&1



Testing

Once any errors have been fixed, we move on to test that Snort will generate alerts and it is in fact working properly. From one of your other computers you can simulate an attacker scanning your system with the popular tool nmap.


Disclaimer: You are responsible for your own actions. Testing of any security settings should only be done on your own equipment in your own lab, unless you have written permission from the owner of the equipment.



If you are having problems first thing to do is to restart all the service so that all changes have taken affect.

$ sudo /etc/init.d/apache2 restart

$ sudo /etc/init.d/snort restart

$ sudo /etc/init.d/mysql restart



If Snort fails to start this command can be used to check Snort config for errors.

$ sudo snort -c /etc/snort/snort.conf -T



References

http://ubuntuforums.org/showthread.php?t=919472 (bodhi.zazen's IDS sticky)

Multi Sensor Intrusion Detection System

Multi Sensor Intrusion Detection System
Version 2.5
Written by Graham Mead

Click here to read in wide screen!

Abstract
This guide will be a multi sensor snort set up with central logging and an administrative front end. Snort will be implemented in this manner to aid the scalability issue of large networks. The guide is split into these segments:

Server Installation, a mandatory stage that forms the central core of the installation. This stage must be performed first.


  • Setting up MySQL
  • Allowing MySQL Network Access
  • Apache and PHP
  • Apache SSL
  • Basic Analysis and Security Engine
  • BASE database Schema
  • Securing BASE with User Login
  • Installing Oinkmaster
  • Bleeding Edge Rules
  • SSH server

Sensor Installation, a mandatory stage that is used to create each Snort sensor


  • Setting up SSH
  • Installing Snort (from source)
  • Installing Snort (Ubuntu binary version)
  • Configuring Snort
  • Installing Oinkmaster

System Testing, an optional stage that tests that the implemented system is operational.

Software Used
Base system: Ubuntu 8.10
Installed from the Ubuntu package manager:
MySQL, Apache HTTP Server, PHP, Oinkmaster, OpenSSH, Snort and Dia (for diagrams).

Downloaded from sites as source.
BASE and Snort.

How it works
The clients would be connected to the network switch as normal, then a mirror port on the switch would configured to send a copy of the data to the Snort sensor. The Snort sensor would then process the traffic it receives and send any alerts through to the alerts interface on the server. The server would then store the alerts in the database so they can be accessed by BASE. The network administrators or the security response team would login to the web server and access BASE to manage the alerts.

Each Snort sensor has two network interfaces, one listening interface for Snort and the other as the alerts interface for the uploading of alerts and general management of the sensor. The management server also has two interfaces, one for allowing connections from the Snort sensors and the second for accessing the web interface.


Server Installation

The first stage is to set up the database server so both Snort and BASE can connect and store/retrieve alerts.

Set up MySQL
First we have to install the MySQL server (which in Ubuntu is MySQL 5). The input is marked as bold text.
$ sudo apt-get install mysql-server mysql-client

This section is a little ugly as I don't really speak SQL very well. We will be setting up two databases, the 'snort' and the 'archive' database. For the Snort alerts database the username is 'snort', the password is 'snortconfpasswd' and the database name is also 'snort'. For the archive database the username is 'archive', the password is 'archiveconfpasswd' and the database name is again also 'archive'.

Snort Database

$ mysql -u root -p

mysql> CREATE DATABASE snort;

mysql> grant INSERT,SELECT,UPDATE,CREATE,DELETE on snort.* to snort;

mysql> grant INSERT,SELECT,UPDATE,CREATE,DELETE on snort.* to snort@localhost;

mysql> SET PASSWORD FOR snort=PASSWORD('snortconfpasswd');

mysql> SET PASSWORD FOR snort@localhost=PASSWORD('snortconfpasswd');

mysql> flush privileges;

mysql> exit

Archive Database

$ mysql -u root -p

mysql> CREATE DATABASE archive;

mysql> grant INSERT,SELECT,UPDATE,CREATE,DELETE on archive.* to archive;

mysql> grant INSERT,SELECT,UPDATE,CREATE,DELETE on archive.* to archive@localhost;

mysql> SET PASSWORD FOR archive=PASSWORD('archiveconfpasswd');

mysql> SET PASSWORD FOR archive@localhost=PASSWORD('archiveconfpasswd');

mysql> flush privileges;

mysql> exit

We then install the schema from the Snort download, the schema file is located in the schema folder of the downloaded archive. Then we import the database schema by issuing the following command in the schema directory.

$ cat create_mysql mysql -u snort -D snort -p

Or if Snort (snort-mysql) was downloaded from the Ubuntu package system.

$ zcat /usr/share/doc/snort-mysql/create_mysql.gz mysql -u snort -D snort -p

Check Database was created correctly.

$ mysql -u root -p

mysql> show databases;

mysql> use snort

A fast way of checking that the schema was imported is to check the tables were created in the Snort database, naturally this only works for a new install. You should see something like this if was successful.

mysql> show tables;


+------------------+

Tables_in_snort

+------------------+

data

detail

encoding

event

icmphdr

iphdr

opt

reference

reference_system

schema

sensor

sig_class

sig_reference

signature

tcphdr

udphdr

+------------------+

16 rows in set (0.00 sec)

Then we check that the Snort user has a password set and has the correct permissions by issuing the below command. Its worth noting that the percentage symbol is a wildcard in MySQL, so snort@% would be accepted from anywhere on the network interface.

mysql> show grants for 'snort';
+------------------------------------------------------------------------------------------------------+

Grants for snort@%

+------------------------------------------------------------------------------------------------------+

GRANT USAGE ON *.* TO 'snort'@'%' IDENTIFIED BY PASSWORD '*461162D3DA0A6C03D88954BE694A7D05FC8AB884'

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE ON `snort`.* TO 'snort'@'%'

+------------------------------------------------------------------------------------------------------+

2 rows in set (0.00 sec)

mysql> exit


Allowing MySQL network access

Allowing any service access to connect to the network is a security risk. MySQL by default binds to port 3306 on the local host (127.0.0.1) as a security/compatibility feature rather than using 'skip-networking' as in the past. Before it can be used across the network this security feature must be disabled or have some other way to access the service.

$ sudo lsof -igrep mysqld

mysqld 6987 mysql 13u IPv4 26244 TCP localhost:mysql (LISTEN)

One way to fix this we would be to open the MySQL configuration file and change the loopback address to a reachable network address. One point to bear in mind by setting an IP address for MySQL to bind, if the interface that owns that address goes down (the cable gets pulled out for example) the MySQL server will fail to start.


When we changed the network address we would rerun the command to check if it has bound to the IP address.

$ sudo lsof -igrep mysqld

mysqld 7349 mysql 10u IPv4 30769 TCP 192.168.58.133:mysql (LISTEN)

However we are going to leave it bound to the loopback interface because it never goes down and we can use SSH as authentication for the MySQL server.

$ sudo nano /etc/mysql/my.cnf

bind-address = 127.0.0.1

After changing the configuration we need to restart the MySQL service.

$ sudo /etc/init.d/mysql restart
Apache and PHP
BASE requires a PHP capable web server, Apache will be used in this example. The following installs the apache2 web server, PHP5 (the apache module), the ADOdb database abstraction library and the PHP PEAR mail modules for BASE to work properly.

$ sudo apt-get install apache2 php5-mysql libphp-adodb php-mail-mime php-mail

First we change into the web server root directory and delete the default "It Works!" page and replace it with a PHP version.

$ cd /var/www/

$ sudo rm index.html

$ sudo nano index.php


Then we enter this PHP test code into the newly created file:

<?php echo "PHP WORKS";?>


To enable the PHP module on Debain/Ubuntu you would run the following:

$ a2enmod php5

Module php5 already enabled

If you get the above message about the PHP module already being enabled all you need to do is to restart Apache.

$ sudo /etc/init.d/apache2 restart


Then use a web browser and browse to the web server at 127.0.0.1, "PHP WORKS" should be displayed if PHP is working.


Finally we set the Apache bind address to the eth1 address of 192.168.69.1 so that the web server is only visible on admin's network.


$ sudo nano /etc/apache2/ports.conf

Listen 192.168.69.1:80


<IfModule mod_ssl.c>

Listen 192.168.69.1:443

</IfModule>


We have just changed the normal HTTP port and just to be safe we have also change the SSL port so if we accidentally enable SSL, BASE will not exposed.


Apache SSL

SSL would be used to protect traffic from being sniffed off the wire and to protect login details.



We first we enable the SSL module.

$ sudo a2enmod ssl



Then we enable the default SSL site.

$ sudo a2ensite default-ssl



We can then verify that SSL is operational (with a default certificate) by browsing to the web server using the https protocol. You would enter 'https://ipaddress/' into the address bar of your web browser.



The SSL documentation can be found by using the following command.

$ zcat /usr/share/doc/apache2.2-common/README.Debian.gz less



The first command we use is to generate a new certificate.

$ sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/ssl/certs/snortserver-file.crt

$ ls -l /etc/ssl/certs/grep snort

lrwxrwxrwx 1 root root 20 2009-02-20 17:53 01d3db93 -> snortserver-file.crt

-rw------- 1 root root 1514 2009-02-20 17:53 snortserver-file.crt



Then after this we backup the default-ssl virtual host.

$ sudo cp /etc/apache2/sites-enabled/default-ssl /root/apache2.default-ssl.back



We then edit the virtual host to use the new certificate file.

$ sudo nano /etc/apache2/sites-enabled/default-ssl



We add this line to the default virtual host above the default lines shown below.

SSLCertificateFile /etc/ssl/certs/snortserver-file.crt



Then we comment out the two default certificate lines.

#SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem

# SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key




Then finally we need to restart the web server so it will load the new configuration file.

$ sudo /etc/init.d/apache2 restart




Basic Analysis and Security Engine

BASE is the PHP script that is used to monitor and manage Snort alerts. We will be downloading BASE from the web because Ubuntu's version is often out of date.



This command will copy BASE into the web server root overwriting the old 'index.php' file.

$ sudo cp -R ~/base-php4/* /var/www/



We change the web server root so that it is owned (thus writable) by the web server user so the configuration file for BASE can be written to disk. After the setup has finished and the configuration is installed don't forget to change back the permissions.

$ sudo chown www-data /var/www/



Browse to the web server and follow the on screen instructions to start the setup process. The first part of the setup is where BASE checks the settings are fine for BASE to operate with any problems being displayed in red.




The second page of the setup is where BASE asks for the path of the ADodb library that was installed along side Apache. The next page is where the database connection information is entered.

After the SQL information has been entered we have the option to enable an authentication system build into BASE.



BASE database Schema

Once BASE can connect to the Snort database, there will be an error saying that the BASE tables are not installed.

The database version is valid, but the BASE DB structure (table: acid_ag)is not present. Use the Setup page to configure and optimize the DB.



Click on the setup page and then click the button to create the BASE tables. After this is done there will be another message. In order to support Alert purging (the selective ability to permanently delete alerts from the database) and DNS/whois lookup caching, the DB user "snort" must have the DELETE and UPDATE privilege on the database. We have set up the Snort user with update and delete privileges.


Once BASE is installed you would see something like this.





Securing BASE with User Login

There are two ways in which BASE can be secured with a user login. First is a web server configured authentication and the second way is to use the built-in authentication of BASE. The Second method is setup at BASE install time and requires less administrative overhead but increases the visibility of the script.



First we create a password file for the apache authentication. It's important not to include the -c switch if the file is already created because it will wipe the file and start a new file.



$ sudo htpasswd -c /etc/apache2/htpasswd snortuser


Then we add the following to the apache configuration

$ sudo nano /etc/apache2/sites-enabled/base.conf

<Directory />

Options FollowSymLinks

AllowOverride None

</Directory>



<Directory “/var/www/”>

AuthType Basic

AuthName "Protected Area"

AuthUserFile /etc/apache2/htpasswd

Require user snortuser

</Directory>



This configuration will protect the script from being seen by unauthorized users. The directory's may change depending on how BASE was installed. The above configuration is for BASE installed by the package downloaded from the website.



The apache.conf included with the Ubuntu package of BASE must be loaded into Apache so that it can be accessed from the web browser. If installed by apt-get on Ubuntu by default it is only accessible from the local host.

$ sudo cp /etc/acidbase/apache.conf /etc/apache2/sites-enabled/



These lines in /etc/apache2/sites-enabled/apache.conf should be commented out to allow access to any external computers or you could enable access per IP address by adding the address/netmask pair to the list. This only affects BASE installed by the package manager.

#order deny,allow

#deny from all

#allow from 192.168.58.0/255.255.255.0, 127.0.0.0/255.0.0.0



$ sudo /etc/init.d/apache2 restart



After these stages you should be able to access BASE via a web browser by entering 'http://<IPAddress>/' into the address bar or https://IPaddress/ if you have SSL enabled.


SSH Server

We will be using the Secure Shell port forwarding to provide an additional layer of security to the MySQL traffic coming from the Snort sensors. We will also be using SSH to remotely access the Snort sensors from the management network. First we must install the server before the sensors can send any data via SSH or we can login remotely.

$ sudo apt-get install openssh-server openssh-client



We add the 'snortssh' to the server as it will be used for the SSH connections.


$ sudo adduser snortssh




Installing Oinkmaster

Oinkmaster is a Perl script that helps administrators update and manage Snort rules. An Oinkcode can be obtained by registering on the Snort website and entering your profile, here there will be an option to generate your Oinkcode.



First we install Oinkmaster.

$ sudo apt-get install oinkmaster



Then we edit the Oinkmaster config file to use an Oinkcode.

$ sudo nano /etc/oinkmaster.conf



We then must comment out any 'url=' lines like the one below and add a line for the Oinkcode.

#url = http://www.snort.org/dl/rules/snortrules-snapshot-*.tar.gz

url = http://www.snort.org/pub-bin/oinkmaster.cgi/<oinkcode>/snortrules-snapshot-2.8.tar.gz



Or add this this line if you want to install the current rule snapshot.

url = http://www.snort.org/pub-bin/oinkmaster.cgi/<oinkcode>/snortrules-snapshot-CURRENT.tar.gz



This is how the URL is formed.

http://www.snort.org/pub-bin/oinkmaster.cgi/<oinkcode>/snortrules-snapshot-<major version>.<minor version>.tar.gz



Then we add this line to the oinkmaster.conf file so Oinkmaster will manage both the official Snort rules and the emerging edge rules.

url = http://www.emergingthreats.net/rules/emerging.rules.tar.gz



We make the directory for the Snort rules and backups to be stored in.

$ sudo mkdir -p /etc/snort/rules

$ sudo mkdir -p /etc/snort/backup



Then we change the owner of the Snort directory to the 'snort' user.

$ sudo chown -R snortssh:snort /etc/snort/




Emerging Threats Rules

The emerging threats rules are a set of Snort rules developed by the community.

Create the emerging.conf in the same directory as the rules so Oinkmaster can update it.



Add the following to the rules section of snort.conf

include $RULE_PATH/emerging.conf



Add the following to the emerging rules conf file to enable the rules. Make sure there are no BLOCK or .xml files listed or enabled.

include $RULE_PATH/emerging-attack_response.rules

include $RULE_PATH/emerging-dos.rules

include $RULE_PATH/emerging-exploit.rules

include $RULE_PATH/emerging-game.rules

include $RULE_PATH/emerging-inappropriate.rules

include $RULE_PATH/emerging-malware.rules

include $RULE_PATH/emerging-p2p.rules

include $RULE_PATH/emerging-policy.rules

include $RULE_PATH/emerging-scan.rules

include $RULE_PATH/emerging-virus.rules

include $RULE_PATH/emerging-voip.rules

include $RULE_PATH/emerging-web.rules

include $RULE_PATH/emerging-web_sql_injection.rules

include $RULE_PATH/emerging.rules

include $RULE_PATH/emerging-drop.rules

include $RULE_PATH/emerging-rbn.rules

include $RULE_PATH/emerging-compromised.rules

include $RULE_PATH/emerging-botcc.rules

include $RULE_PATH/emerging-dshield.rules



Rules would be enabled and disabled via Oinkmaster with the 'enablesid' and 'disablesid' statements.

disablesid 1,3,4

enablesid 2



Finally we run Oinkmaster manually to install the rules. We use the snortssh user to run Oinkmaster because Oinkmaster shouldn't be run as root.

$ su snortssh -c oinkmaster -o /etc/snort/rules/


We then set up a cron job to run these commands once a day.

$ sudo crontab -u snortssh -e

6 0 * * * /usr/sbin/oinkmaster -o /etc/snort/rules/ -b /etc/snort/backup >/dev/null 2>&1

12 0 * * * /bin/tar -C /etc/snort -czf ../rules.tar.gz rules/



Emailing the output of Oinkmaster's updates to the rules is possible but its outside the scope of this guide, It may be added in a future version.


Sensor Installation


Setting up SSH

We need to install the SSH server so that the sensor can be remotely managed.

$ sudo apt-get install openssh-server openssh-client



Then we add a user to the system that will be used for the connections.

$ sudo adduser snortssh



We change into the snortssh user that we will be setting up the connections.

$ su snortssh



Then we generate the key used for authentication. This command generates two files the private key 'id_rsa' and the public key 'id_dsa.pub'.

$ ssh-keygen -t rsa



Finally we copy the public part of the key to the server.

$ ssh-copy-id ~/.ssh/id_rsa.pub snortssh@192.168.58.133



We will be using AutoSSH to automatically reconnect the SSH connections to the server.

$ sudo apt-get install autossh



First we set up the connection to the server to do this manually with SSH.

$ ssh -N -f -L 3306:192.168.58.133:3306 snortssh@192.168.58.133



So that autossh starts at boot time we add the following autossh line to the /etc/rc.local file above the 'exit 0' line.

$ sudo nano /etc/rc.local

autossh -L 3306:192.168.58.133:3306 snortssh@192.168.58.133 &



Then we check the connection is established.

$ sudo lsof -i grep ssh

COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME

ssh 7006 snortssh 3u IPv4 28179 TCP snortsensor:48670->snortserver:ssh (ESTABLISHED)

ssh 7006 snortssh 4u IPv4 28182 TCP localhost:mysql (LISTEN)

ssh 7006 snortssh 5u IPv6 28183 TCP ip6-localhost:mysql (LISTEN)



After this we test connectivity.

$ mysql -u snort -p -h 127.0.0.1


Finally we check that the connection is encrypted by using a packet capture utility. If the SSH connection was not correctly configured you would see some raw data being sent to the MySQL server but with SSH it would all be encrypted. We will be using key based authentication for the sensors, this allows password-less logins.


SSH Works!


Installing Snort from source (Recommended)

First thing we have to do is install the software that we need to build Snort from the source code.

$ sudo apt-get install build-essential libpcap0.8-dev libmysqlclient15-dev bison flex libc6-dev g++ gcc pcregrep libpcre3-dev



Then we obtain the latest stable version (which was snort-2.8.3.2 at time of writing) and extract the archive.

$ wget http://www.snort.org/dl/snort-2.8.3.2.tar.gz

$ tar zxvf snort-2.8.3.2.tar.gz



The install notes for Snort are held in the doc sub directory and lists all the configure options. All these commands are run from the Snort source code directory.



$ ./configure --enable-dynamicplugin --with-mysql



Then we compile the software and install it to the system.

$ make

$ sudo make install



I had a compile time error with Ubuntu 8.10 but a quick trip to the linuxforums.org I managed to fix the problem.



Next we add a user account for Snort so that it's not running as the root user. Any password can be used as the account will be locked anyway. We need to set the shell to '/bin/true' which does nothing.

$ sudo adduser snort

$ sudo chsh snort

$ sudo passwd snort -l



Finally we create some of the directories that Snort need to run and assign the correct permissions.


$ sudo mkdir -p /etc/snort/rules /etc/snort/backup /var/log/snort


$ sudo chown -R root:snort /var/log/snort

$ sudo chmod -R 770 /var/log/snort


We need to copy the etc directory from the source tarball to the local install's config directory.


$ sudo cp <snortSRC>/etc/* /etc/snort/


Then we need to write/install a boot script. I'm using the script written by bodhi.zazen from the Ubuntu forums. Then after the boot script is installed to the system we add the following line to the /etc/rc.local file before any 'exit 0' statements so Snort will be started at boot time. We also need to make the script executable before it can be run.


$ sudo cp ubuntu.snort.init.txt /etc/init.d/snort


$ sudo chmod +x /etc/init.d/snort


$ sudo nano /etc/rc.local


exec /etc/init.d/snort boot


We have to make sure that bodhi.zazen's script has the correct interface to start snort with. The IFACE="eth0" would have to be changed to IFACE="eth1".


Installing Snort (Ubuntu's binary version)

Ubuntu installed from the package manager. This should only be used if the Install from source fails and you can't fix it.

$ sudo apt-get install snort-mysql



After you run this, the installer will ask you to configure the HOME_NET, this should be set to your network mask. Apport will most likely pop up telling you that Snort has crashed, this is unlikely the case as the Snort (with MySQL) version in Ubuntu comes with a block that stops it from starting until an output source has been configured. To see the error message, you would try to start Snort with the init script that comes with the Ubuntu package.

$ sudo /etc/init.d/snort start





Configuring Snort


We will be using eth1 in this example to enable Snort to listen on an interface without an IP address. We need to add this special configuration to the interfaces configuration file.


$ sudo nano /etc/network/interfaces


auto eth1

iface eth1 inet manual

up ifconfig $IFACE 0.0.0.0 up

up ip link set $IFACE promisc on

down ip link set $IFACE promisc off

down ifconfig $IFACE down


We need to copy the config file in case we make a lot of mistakes.

$ sudo cp /etc/snort/snort.conf /etc/snort/snort.conf.org



Then we edit the main Snort configuration file.

$ sudo nano /etc/snort/snort.conf



We set the HOME_NET variable to the network address with network mask.

var HOME_NET [192.168.58.0/24]

var EXTERNAL_NET !$HOME_NET



This line sets the base path for the rules files which are listed at the bottom of the config file.

var RULE_PATH /etc/snort/rules



This is an important option to uncomment if your computer has low memory, as with all most of the standard rules and the emerging threats rules on my test computer it used 558.78 Mbytes of memory on one interface. However with this option enabled it used about 15 Mbytes. On a system with large amounts of memory like a dedicated Sensor higher performance can be gained by keeping it commented out.

config detection: search-method lowmem



The output database line should be configured for now, so we can see that everything is working.

output database: log, mysql, user=snort password=snortconfpasswd dbname=snort host=<ServerIP>



These following options are only used by Debian systems (Ubuntu packages). Most of these are defaults and they should stay that way. However you should configure the HOME_NET line and make sure that Snort is listening on the correct interface if you have more than one.

$ sudo nano /etc/snort/snort.debian.conf

DEBIAN_SNORT_STARTUP="boot"

DEBIAN_SNORT_HOME_NET="192.168.58.0/24"

DEBIAN_SNORT_OPTIONS=""

DEBIAN_SNORT_INTERFACE="eth1"

DEBIAN_SNORT_SEND_STATS="true"

DEBIAN_SNORT_STATS_RCPT="root"

DEBIAN_SNORT_STATS_THRESHOLD="1"



Once the basic configuration has been done we check to see if Snort has any problems with it by running the following command. If all goes well you should see something similar to the output below.

$ sudo snort -c /etc/snort/snort.conf

....

--== Initialization Complete ==--



,,_ -*> Snort! <*-

o" )~ Version 2.7.0 (Build 35)

'''' By Martin Roesch & The Snort Team: http://www.snort.org/team.html

(C) Copyright 1998-2007 Sourcefire Inc., et al.



Rules Engine: SF_SNORT_DETECTION_ENGINE Version 1.6 <Build 11>

Preprocessor Object: SF_SMTP Version 1.0 <Build 7>

Preprocessor Object: SF_DCERPC Version 1.0 <Build 4>

Preprocessor Object: SF_FTPTELNET Version 1.0 <Build 10>

Preprocessor Object: SF_SSH Version 1.0 <Build 1>

Preprocessor Object: SF_DNS Version 1.0 <Build 2>

...



If Snort does find any errors in the configuration, it will exit to the user prompt with the error just above it. The following example is when the MySQL logging is configured but the MySQL server has not been started or can't be contacted.

ERROR: database: mysql_error: Can't connect to MySQL server on '192.168.58.13' (113)

Fatal Error, Quitting..



Restart Snort every 6 hours

We have to restart Snort every few hours because the database connection can timeout if no traffic has been received for a while. Yes this is a bad thing and is a big problem with a well tuned sensor that has few false positives (normal traffic being detected as an attack). It's also used to automatically get Snort to reload the rules so any new ones will be loaded.


$ sudo crontab -e

20 0,6,12,18 * * * /etc/init.d/snort restart >/dev/null 2>&1





Installing Oinkmaster


We will be using Oinkmaster on the sensors to pull the Snort rules from the master copy on the server.



First we install Oinkmaster.

$ sudo apt-get install oinkmaster



Then we edit the Oinkmaster config file to specify the URL of the server.

$ sudo nano /etc/oinkmaster.conf



Then we add this line to the oinkmaster.conf file so Oinkmaster will download the rules from the server and not from the Internet.

url = scp://snortssh@192.168.58.133:/etc/snort/rules.tar

scp_key = /home/snortssh/.ssh/id_rsa



Testing


Once any errors have been fixed, we move on to test that Snort will generate alerts and it is in fact working properly. From one of your other computers you can simulate an attacker scanning your system with the popular tool nmap.


Disclaimer: You are responsible for your own actions. Testing of any security settings should only be done on your own equipment in your own lab, unless you have written permission from the owner of the equipment.



If you are having problems first thing to do is to restart all the service so that all changes have taken affect.

$ sudo /etc/init.d/apache2 restart

$ sudo /etc/init.d/snort restart

$ sudo /etc/init.d/mysql restart



If Snort fails to start this command can be used to check Snort config for errors.

$ sudo snort -i eth1 -c /etc/snort/snort.conf -T


Further Improvements


OSSEC in a Client/Server installation could be used to monitor and report the condition of the sensors. This would also alert the administrators to a possible compromise of a sensor.



Emailing the output of the Oinkmaster rule updating process so administrators can keep up to date about the newly installed rules. This would require an email server and some simple scripting.


Barnyard fast output system.


References

http://ubuntuforums.org/showthread.php?t=919472 (bodhi.zazen's IDS sticky)


Thanks to Andreios for checking this HOWTO.

Introduction to FreeBSD for Newbies

This makes no attempt to replace the most excellent FreeBSD Handbook and simply provides a quick overview of how things work with FreeBSD for new people.

FreeBSD Installation


Here are some of the important points to bare in mind when installing FreeBSD.


FreeBSD can run on both 32 bit and 64 bit processors. If you are unsure what version to use, the 32 bit version can run on both 64 bit and 32 bit processors however the 64 bit version can only run on 64 bit processors. I would recommend people to read more about the x86 and x86-64 architectures if they are unsure. Other processors architectures like PowerPC and Sparc64 are supported by FreeBSD but most people are not likely come across these without knowing what they are.


Hardware requirements are expected to be at least in this general area, FreeBSD can be run on lower spec hardware but roles are limited.


Any modern processor (Pentium or better)

64+ MB of RAM

500+ MB of Disk space

Linux/BSD: Serial Console vs SSH

We will be setting two different server administration methods against each other. In one corner we have a trusty serial console and in the other corner we have the newer Secure Shell (SSH).
Serial Console
If like many network administrators you have managed devices through a serial port, you may like to know that this can also be done for the command line on *Nix distros. It's set up at the hardware layer in it's most basic form with a null-modem serial cable connected to the serial ports on both computers. Naturally both computers must have a serial port which some newer computers don't as they are being depreciated.
The serial console has the advantage over SSH that it doesn't require the network to be running to work and the serial console adds no network services. A serial console is good for when you need to receive console messages remotely or you want root access restricted to a physical connection.
A Linux configuration example can be found here and the FreeBSD configuration information can be found here.
SSH
Secure Shell is a network service that operates over the network layer (an IPv4 network for example) and give access to a shell account via an encrypted channel. SSH can be used over structured cabling which makes it easy to implement. SSH offers key-based authentication, connection tunneling and secure file transfer which are useful to system administrators.
Configuration to get a working OpenSSH installation isn't typically required but tweeking may be required.
SSH provides Secure File Transfer (sftp) which helps cut down some of the administrative overhead that is part of using a serial connection.
Conclusion
SSH provides access to much more functionality than a serial console and has been around for long enough to be suitability mature. There are times when a serial connection can be useful, for example programmers debugging device drivers. For most people SSH is going to be the better option.

Supply Help tool for hacking source-code :: Source-code browser

หลังจากที่ลองนั่งหัดเขียนภาษา C ไปได้สักพัก เลยลองแกะซอสต์โค้ดของโปรแกรม wifidog แบบเล่นๆ ดู แต่ปรากฏว่าเกิดอาการงง กับการอ้างอิงฟังก์ชั่นเชื่อมต่อครั้นจะมานั่ง map โดยการใช้มือ จดในกระดาษเอา ไม่ไหวแน่ ถ้าโปรแกรมมีขนาดใหญ่เลยอยากได้ tool มาช่วย
Tool ประเภทนี้เรียกว่า "Source code browsing Tools" ช่วยสำหรับ track sourceประหยัดเวลาไปได้มากโข ( หาตั้งนานเหมือนกันเพราะไม่รู้ชื่อโปรแกรมประเภทนี้เรียกว่าอะไร ) สำหรับ Linux ตอนนี้เข้าไปดูได้ที่
#GNU Software Global
http://www.gnu.org/software/global/links.html
#Source-code browsing tools :: Opensolaris project
http://www.opensolaris.org/os/project/opengrok/
แต่ตอนนี้ยังไม่ไดทำการ คอนฟิก Opengrok ไว้วันหลังทำเสร็จแล้วจะเอามาส่งต่อให้อีกทีหนึ่ง เนื่องจากอยากลองใช้ command-line ต่างๆ ที่มีของ GNU ให้คล่องแล้วลองเทียบข้อดีข้อเสีย กับความถนัดของตัวเอง ดู
GNU cflow เป็น tool command-line สำหรับ map source สามารถนำเอาผลลัพธ์ไปแสดงผลในโปรแกรมอื่นได้ ** คนละตัวกับ cflow apt-get นะครับ ftp://download.gnu.org.ua/pub/release/cflow/
cscope command-line tool สำหรับทำการ ค้นหา function ในไฟล์ source-code ตัวนี้ยังไม่ได้ลองเล่นเพราะไม่ถนัด regexp เลยข้ามไปก่อน apt-get install cscope
kscope KDE frontend ของ cscope ทำงานร่วมกับ ctags เป็น editor ในตัวได้ด้วยเหมาะกับโปรแกรมขนาดเล็กๆ ( ในความคิดผมนะ ) เพราะ การ link ข้ามกันเพื่อทำการแก้ไข หรือ ไปดูยังไฟล์ต่างๆ ยังช้าไปหน่อย โดยรวมถือว่า Ok. apt-get มา โปรแกรมจะติดตั้ง cscope มาให้ด้วยapt-get install ctags kscope
ctags tool สำหรับ tagging C ไฟล์ สนับสนุนหลายภาษา และ เอาไปใช้กับ editor หลายตัวได้เช่น Vim เป็นต้น http://ctags.sourceforge.net/
** NCC ncc - The new generation C compiler ตัวนี้น่าสนใจมาก ใช้งานได้ดี สามาถนำเอาoutput ไป generate เป็น graph เพื่อแสดงผลได้ feuture มันรวมเอาทั้ง ctags,cscope มาไว้ด้วยกันทำให้ ง่านต่อการใช้งาน


----------------------
#HomePagehttp://students.ceid.upatras.gr/~sxanth/ncc/#Downloadhttp://students.ceid.upatras.gr/~sxanth/ncc/ncc-2.6.tar.gz
โปรแกรมมีสองส่วนคือ ตัว complier ( gen output ) ncc และตัว viewer nccnavi
**ถ้าโปรแกรมขนาดใหญ่มากๆ ให้ใช้ออปชั่น make ไปเลยดีกว่า ทำทีเดียวท้งแผงเลย
#Usage!
udomsak#mkdir ~/project/svn
udomsak#svn checkout https://dev.wifidog.org/svn/trunk/wifidog
udomsak#cd ~/project/svn/wifidog
udomsak#./configure
udomsak#make CC="ncc -nccout" [ option to generate extension .nccout file per file ]
udomsak#find -name "*.nccout" -exec cat {} >> wifidog-all.map \;
udomsak# nccnav wifidog-all.map
#If error occut can use make -i for ignore :)
** Options ที่เหลืออ่านใน README เพิ่มเติมได้ครับ
#When NCC runing !



#use NCC to list functions in file and track call by and calling function


#I use "GNU cflow" to generate ASCII art or graph too.




#Graph generate program
http://www.csn.ul.ie/~mel/projects/codeviz/
and
http://www.graphviz.org/
#install graphviz
apt-get install graphviz
#convert GNU cflow to "dot format" use by 'dot' program like to generate chart
http://cflow2vcg.sourceforge.net/
udomsak# cd mysrc
#generate per file mapping
udomsak#for i in *.c ; do cflow --format=posix --omit-arguments --level-indent='0=\t' --level-indent='1=\t' --level-indent=start='\t' $i tee $i.map ; done
#If want all 'C' file make Overall project graph
udomsak#for i in *.map ; do cat $i ~/bin/cflow2dot tee $i.dot ; done
#Use 'dot' program to generate graph " dot -T[language] -o [ output ] [ input file]"
udomsak# dot -Tsvg Overview.dot -o Mymap.svg
#Thank you for FOSS and GNU for program tool :-)~

ติดตั้ง PHP 5 + IIS5 + ISAPI บน WindowsXP

พอดีกำลังจะทดลองเขียน script ทำงานบนวินโดว์โดยใช้ PHP ครั้นจะลง Apache งาน .NET ที่อยากจะทดลอง

ทำก็มีให้ต้องเปลี่ยนพอร์ทอีก เลยตัดสินใจเอา PHP มาลงโดยใช้ เป็นรูปแบบเป็น ISAPI เพื่อที่สามารถใช้งานได้ทั้งสอง

ระบบคือ PHP กับ .NET โดยไม่ต้องเปลี่ยน HTTP Server กว่าจะทำได้เกือบทั้งวัน เพราะมันไม่ยอมทำงานไม่ว่า

จะลองดาวน์โหลดเป็น MSI มาติดตั้ง หรือ ติดตั้งเป็นแบบ zip ไฟล์ นี่ก็เพิ่งรันได้ ก็เลยเขียน ขึ้น blog เลยดีกว่า เผื่อใคร

ทำดูแล้วติดปัญหา ก็จะได้ประหยัดเวลาไป



ปัญหาที่เกิดคือ HTTP 500 Internal server Error แต่ไม่มี error ใน log file ให้ debug เลย



ดาวน์โหลดไฟล์





ไปดาวน์โหลด php มาได้จาก php zip version extract ไฟล์ออกมาไว้ที่ c:\php



ไปดาวน์โหลด extension เพิ่มเติม ( pecl ) ไม่งั้นจะ error ว่าหา dll ไฟล์ไม่พบเพราะเนื่องจากตัว extension

หลายต่อหลายตัวต้องการ extension อื่นเข้าร่วมเพื่อประกอบการทำงานด้วย โหลดได้ที่นี่ครับ http://th.php.net/get/pecl-5.2.4-Win32.zip/from/a/mirror

extract ไปไว้ที่ c:\php\extras









Edit php configuration





rename file php.ini-recommanded ให้เป็น php.ini โดยก่อนทำก็แบ็คอัพไฟล์ต้นฉบับทั้งสองไฟล์ไว้ก่อน

กันเหนียว เผื่อมีอะไรผิดพลาดก็แก้ใหม่ได้ แล้วใช้ ก็อปปี้ extension list ตามนี้ไปใส่ใน ไฟล์ php.ini โดยไฟล์ราย

ละเอียดต้นฉบับผมเอามาจาก http://www.peterguy.com/php/install_IIS6.html พร้อมทั้งปรับแต่ง คอมเม้นท์

เพิ่มอีกหลายรายการเหมือนกัน เพราะเกิด error ซึ่ง error พวกนั้นผมยังไม่จำเป็นต้องใช้ ท่านใดต้องการคงต้องมีการติดตั้ง

กันเองทีหลัง



**php.ini ที่แก้ไขแล้ว



-----------------------------



extension=php_adt.dll

extension=php_amf.dll

;extension=php_apc.dll ; Alternative PHP Cache (http://pecl.php.net/package/APC) - significantly increases CPU load

extension=php_apd.dll

extension=php_bcompiler.dll

extension=php_bitset.dll

;extension=php_blenc.dll ; if enabled, test page is blank. Transparent PHP Script Encryption using Blowfish (http://pecl.php.net/package/BLENC)

extension=php_bz2.dll

extension=php_bz2_filter.dll

extension=php_classkit.dll

extension=php_cpdf.dll

extension=php_crack.dll

extension=php_curl.dll

extension=php_cvsclient.dll

;extension=php_db.dll - deprecated. Use php_dba.dll instead.

extension=php_dba.dll

extension=php_dbase.dll

extension=php_dbx.dll

extension=php_dio.dll

extension=php_docblock.dll

;extension=php_domxml.dll ; threw a bunch of "PHP Notice: Constant XML_... already defined ..." errors.

extension=php_event.dll

extension=php_mbstring.dll ; mbstring must be defined before exif.

extension=php_exif.dll

extension=php_fdf.dll

extension=php_fileinfo.dll

extension=php_filepro.dll

extension=php_fribidi.dll

extension=php_gd2.dll ; gif draw - http://www.boutell.com/gd

extension=php_gettext.dll

extension=php_gmp.dll

extension=php_gopher.dll

extension=php_haru.dll

extension=php_htscanner.dll

extension=php_http.dll

extension=php_hyperwave.dll

;extension=php_ibm_db2.dll ; IBM DB2 database

extension=php_id3.dll

;extension=php_ifx.dll ; Informix database.

;extension=php_iisfunc.dll ; Enable IIS and service management via PHP (http://kromann.info/article.php?Id=11062861865960000) - significantly increases CPU load

extension=php_imagick.dll ; ImageMagick (http://pecl.php.net/package/imagick).

extension=php_imap.dll

;extension=php_ingres.dll ; Ingres database - complains about missing iilibapi.dll

extension=php_interbase.dll

extension=php_java.dll

extension=php_ldap.dll

extension=php_lzf.dll

extension=php_mailparse.dll ; requires php_mbstring.dll

;extension=php_maxdb.dll ; requires MySQL maxDB (www.mysql.com/maxdb)

extension=php_mcrypt.dll ; requires the mcrypt library (libmcrypt.dll - http://mcrypt.sourceforge.net/, http://files.edin.dk/php/win32/mcrypt/, ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/attic/libmcrypt/old/win32/)

extension=php_mcrypt_filter.dll

;extension=php_mcve.dll

extension=php_memcache.dll

extension=php_mhash.dll

extension=php_mime_magic.dll

extension=php_ming.dll

extension=php_msql.dll

extension=php_mssql.dll

extension=php_mysql.dll

extension=php_mysqli.dll

;extension=php_netools.dll ; requires lcrzo.dll (http://www.icewalkers.com/Linux/Software/516050/lcrzo.html)? Appears to be a very fragile project. PECL extension page: http://pecl.php.net/package/netools

extension=php_ntuser.dll

;extension=php_oci8.dll ; OCI for ORacle databases

extension=php_oggvorbis.dll

extension=php_openssl.dll

extension=php_operator.dll

;extension=php_oracle.dll ; Oracle database

extension=php_parsekit.dll

extension=php_pdf.dll

extension=php_pdo.dll

extension=php_pdo_firebird.dll ; requires php_pdo.dll

;extension=php_pdo_ibm.dll

;extension=php_pdo_informix.dll ; more Informix ; requires php_pdo.dll

extension=php_pdo_mssql.dll ; requires php_pdo.dll

extension=php_pdo_mysql.dll ; requires php_pdo.dll

;extension=php_pdo_oci.dll ; more OCI ; requires php_pdo.dll

;extension=php_pdo_oci8.dll ; yet more OCI ; requires php_pdo.dll

extension=php_pdo_odbc.dll ; requires php_pdo.dll

extension=php_pdo_pgsql.dll ; requires php_pdo.dll

;extension=php_pdo_sqlite.dll ; requires php_pdo.dll

;extension=php_pdo_sqlite_external.dll

extension=php_pgsql.dll

;extension=php_phar.dll

extension=php_phpdoc.dll

extension=php_pop3.dll

;extension=php_printer.dll ; significantly increases CPU load

;extension=php_pspell.dll ; ASpell - http://www.aspell.net/win32

extension=php_radius.dll

;extension=php_rar.dll

extension=php_runkit.dll

;extension=php_sam.dll

extension=php_sdo.dll

extension=php_shmop.dll

extension=php_smtp.dll

;extension=php_snmp.dll ; Throws a bunch of "Cannot find module" errors.

extension=php_soap.dll

extension=php_sockets.dll

extension=php_spl_types.dll

extension=php_sqlite.dll ; requires php_pdo.dll

extension=php_ssh2.dll

extension=php_stats.dll

extension=php_stem.dll

;extension=php_svn.dll ; requires intl3_svn.dll (Subversion Revision control system - http://pecl.php.net/package/svn)

extension=php_swish.dll

;extension=php_sybase_ct.dll ; sybase database

;extension=php_threads.dll ; significantly increases CPU load

;extension=php_tidy.dll ; significantly increases CPU load

extension=php_timezonedb.dll

extension=php_translit.dll

extension=php_uploadprogress.dll

extension=php_win32ps.dll

extension=php_win32scheduler.dll

extension=php_win32service.dll

extension=php_win32std.dll

extension=php_xmlrpc.dll

extension=php_xsl.dll

extension=php_zip.dll

extension=php_zlib_filter.dll



------------------ End



( ใน howto พูดถึงเรื่องการ ปรับแต่งค่าสถานที่เก็บ session file หากไม่ต้องการก็ข้ามไปได้เลย )



ปรับแต่งค่าเพิ่ม โดยเอา คอมเม้นท์ บรรทัดที่เขียนว่า



cgi.force_redirect แล้ว set ค่าให้เท่ากับ 0 ( ของเดิมเป็น 1 )



เรียบร้อยแล้วก็ทำการ save เลย









เพิ่มค่าใน registry file





สร้าง text file ขึ้นมาไฟล์หนึ่งจากนั้นก้อปปี้ค่าข้างล่างใส่ แล้วก็ save ซะ ตั้งชื่อเป็นอะไรก็ได้ ( สำหรับผมทำนะ แต่

ใน howto เขาตั้งชื่อเป็นทางการหน่อยคือ inifilepath.reg



Windows Registry Editor Version 5.00



[HKEY_LOCAL_MACHINE\SOFTWARE\PHP]

"IniFilePath"="C:\\PHP"



save แล้วก็ double click เพื่อเป็นการ install จบ











ติดตั้ง ISAPI สำหรับ IIS ทำตาม link นี้เลยครับ







http://www.phplivesupport.com/documentation/viewarticle.php?aid=76&pid=8



เป็นอันเรียบร้อย เหตุที่ผมใช้เป็นแบบ zip ไฟล์เนื่องจากปัญหาน้อยกว่า และ ติดตั้งง่ายกว่า msi package อ้อ ถ้าท่าน

เผลอไปติดตั้งเป็นแบบ msi แต่ใช้งานไม่ได้ เปลี่ยนมาติดตั้งเป็นแบบ zip ไฟล์ก็ไม่หาย ให้เปิด registry หาคีย์ที่เขียน

ว่า php5isapi.dll ว่ามันอ้างอิงค่า ถูกต้องหรือเปล่า เช่นของผมมันเป็น php5is~1.dll ก็เขียนแก้ไขใหม่ซะ



**ปัญหา HTTP 500 Internal Server Error ในตอนการติดตั้งเป็นแบบ ISAPI หลังจากการติดตั้งแล้ว ส่วน

มากเกิดจากการกำหนดค่า ISAPI มีความผิดพลาด ให้ตรวจค่าใน registry ว่ามีการเขียนค่าถูกต้องหรือไม่ โดยค้น

จากคีย์เวิร์ด php5isapi.dll ( registry missing config for ISAPI by MSI )ตามที่บอก






อ้างอิง Howto ( thx :-)~ )



PHP5+IIS6 Install Howto





http://www.peterguy.com/php/install_IIS6.html



PHP5+ISAPI+IIS5 on WindowsXP Howto





http://www.phplivesupport.com/documentation/viewarticle.php?aid=76&pid=8



Another idea





http://www.faqts.com/knowledge_base/view.phtml/aid/44904/fid/1655