CNS 101
CNS 101
EXP.NO : 10
DATE :
Demonstrate IDS using Snort
AIM:
To demonstrate intrusion detection system using Snort.
INSTALLATION PROCEDURE:
1. Download SNORT from snort.org
2. Install snort with or without database support.
3. Select all the components and Click Next.
4. Install and Close.
5. Skip the WinPcap driver installation
6. Add the path variable in windows environment variable by selecting new classpath.
7. Create a path variable and point it at snort.exe variable name path and variable value:
c:\snort\bin.
8. Click OK button and then close all dialog boxes.
9. Open command prompt and type the commands.
STEPS:
SNORT can be configured to run in three modes:
1. Sniffer mode
• snort –v Print out the TCP/IP packets header on the screen
• snort –vd Show the TCP/IP ICMP header with application data in transit.
• snort –dev –l c:\log snort will automatically know to go into packet logger mode, it
collects every packet it sees and places it in log directory.
• snort –dev –l c:\log –h ipaddress/24 This rule tells snort that you want to print out the
data link and TCP/IP headers as well as application data into the log directory.
• snort –l c:\log –b This is binary mode logs everything into a single file.
C:\Snort\bin\snort –v
C:\Snort\bin\snort –vd
C:\Snort\bin>Snort -i 1 -c c:\snort\etc\anort.conf -T
1. Install Snort on a Linux system (e.g., Ubuntu) using sudo apt install snort.
2. Configure Snort with a custom rule, e.g., alert icmp any any -> any any (msg:"ICMP
Packet Detected"; sid:1000001;).
3. Start Snort in IDS mode with: snort -A console -q -c /etc/snort/snort.conf -i eth0.
4. Generate traffic (e.g., ping another device) to trigger the ICMP rule.
5. Observe alerts in the console or log file showing detection of suspicious packets.
RESULT:
Thus, the snort IDS Demonstration successfully.
AIM:
To demonstrate verification of integrity Check (MD5 Tool).
INSTALLATION PROCEDURE:
1.Open Web Browser: Launch any web browser such as Chrome, Firefox, or Edge.
2.Visit Official Website: Go to the official download page of the MD5 tool, e.g.,
https://raylin.wordpress.com/downloads/md5-sha-1-checksum-utility/
3.Download Installer: Click on the appropriate download link to download the MD5 Checksum
Utility setup file (usually a .exe file).
4.Locate Installer File: After download completes, navigate to the folder where the installer file is
saved (commonly the Downloads folder).
5.Run the Installer: Double-click the installer file to begin the installation process.
6.Follow Setup Wizard: Accept the license agreement and follow the on-screen instructions to
complete the installation.
7.Launch the Tool: Once installed, open the MD5 utility software from the Start Menu or desktop
shortcut to begin using it.
STEPS:
cat file.txt
To compute the MD5 hash for file.txt and display it in the console, run:
md5sum file.txt
Example Output:
098f6bcd4621d373cade4e832627b4f6 file.txt
This 32-character hash is unique to the file. If the file changes, the hash will also change.
098f6bcd4621d373cade4e832627b4f6 file.txt
cat checksum.md5
md5sum -c checksum.md5
Expected Output:
file.txt: FAILED
md5sum -c checksum.md5
file.txt: FAILED
md5sum: WARNING: 1 computed checksum did NOT match
Since the file changed, you must recalculate its MD5 hash:
md5sum -c checksum.md5
If no further modifications were made, it should return:
file.txt: OK
Result:
Thus, the Verification of Integrity Check (MD5 Tool) have been successfully completed.
AIM:
To deploy and monitor a honeypot within a network environment in order to detect and analyze
unauthorized access attempts, simulate vulnerable systems to study attack patterns, and enhance network
security by improving threat detection and incident response.
PROCEDURE:
INTRODUCTION:
Cowrie is an SSH and Telnet honeypot designed to log brute-force attacks and shell interactions performed
by attackers. This guide walks through setting up Cowrie on a Linux system, testing it, monitoring logs, and
removing it to restore normal SSH functionality.
INSTALLATION:
cd /opt
sudo git clone https://github.com/cowrie/cowrie.git
sudo chown -R $USER:$USER cowrie
cd cowrie
cp etc/cowrie.cfg.dist etc/cowrie.cfg
sed -i 's/#listen_port = 2222/listen_port = 2222/' etc/cowrie.cfg
sed -i 's/#enable_telnet = true/enable_telnet = true/' etc/cowrie.cfg
sed -i 's/loglevel = DEBUG/loglevel = INFO/' etc/cowrie.cfg
mkdir -p /opt/cowrie/var/log/cowrie
mkdir -p /opt/cowrie/var/run
chmod -R 755 /opt/cowrie/var/
cd /opt/cowrie
bin/cowrie start
bin/cowrie status
tail -f /opt/cowrie/var/log/cowrie/cowrie.log
cat /opt/cowrie/var/log/cowrie/cowrie.json
RESULT:
Thus the Cowrie honeypot was successfully set up and configured to emulate SSH and Telnet
services, allowing it to attract and log unauthorized access attempts and recorded attacker behavior,
including commands and session activity, which provided valuable insights into intrusion methods.