aboutsummaryrefslogtreecommitdiffstats
path: root/cron-sh/promisc_check.sh
diff options
context:
space:
mode:
authorYoann Vandoorselaere <yoann@mandriva.com>1999-11-25 19:44:10 +0000
committerYoann Vandoorselaere <yoann@mandriva.com>1999-11-25 19:44:10 +0000
commit78b13ca5f0677f9e6e5a07a18473a2d7724b51d0 (patch)
tree1aa278480009928f545f8668bc87c4eaafbc7e7b /cron-sh/promisc_check.sh
parent7f3bfad3df657529ee81b741c6fb10d847315c85 (diff)
downloadmsec-78b13ca5f0677f9e6e5a07a18473a2d7724b51d0.tar
msec-78b13ca5f0677f9e6e5a07a18473a2d7724b51d0.tar.gz
msec-78b13ca5f0677f9e6e5a07a18473a2d7724b51d0.tar.bz2
msec-78b13ca5f0677f9e6e5a07a18473a2d7724b51d0.tar.xz
msec-78b13ca5f0677f9e6e5a07a18473a2d7724b51d0.zip
Initial revision
Diffstat (limited to 'cron-sh/promisc_check.sh')
-rwxr-xr-xcron-sh/promisc_check.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/cron-sh/promisc_check.sh b/cron-sh/promisc_check.sh
new file mode 100755
index 0000000..fa5b538
--- /dev/null
+++ b/cron-sh/promisc_check.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+if [ -f /etc/security/msec/security.conf ]; then
+ . /etc/security/msec/security.conf
+else
+ exit 1
+fi
+
+PROMISC_CHECK="/usr/bin/promisc_check -q"
+#
+# Check if a network interface is in promisc check...
+# Written by Vandoorselaere Yoann, <yoann@mandrakesoft.com>
+#
+
+LogPromisc() {
+ Syslog "Security warning : $1 is in promiscuous mode. (sniffer running ?)"
+ Ttylog "\\033[1;31mSecurity warning : $1 is in promiscuous mode.\\033[0;39m"
+ Ttylog "\\033[1;31mA sniffer is probably running on your system.\\033[0;39m
+}
+
+if [ -f /etc/security/msec/security.conf ]; then
+ . /etc/security/msec/security.conf
+else
+ exit 1
+fi
+
+if [ CHECK_PROMISC == "no" ]; then
+ exit 0;
+fi
+
+for INTERFACE in `$PROMISC_CHECK`; do
+ LogPromisc $INTERFACE
+done
+
+
+
+
+
+
+