Scanning Virus in Linux Using ClamAV


ClamAV
Clam AntiVirus (ClamAV) is a free and open-source, cross-platform antivirus software tool-kit able to detect many types of malicious software, including viruses. One of its main uses is on mail servers as a server-side email virus scanner. The application was developed for Unix and has third party versions available for AIX, BSD, HP-UX, Linux, OS X, OpenVMS, OSF (Tru64) and Solaris. As of version 0.97.5

ClamAV Installation Script for Ubuntu

#!/bin/bash

Updating System
sudo apt-get update

Installing ClamAV
sudo apt-get install clamav

Build ClamAV from Source
sudo freshclam

Scanning Virus on UBUNTU System by Giving Below Commands
clamscan -r /home
clamscan -r /var

Installing ClamTK for GUI Interface
sudo apt-get install clamtk

Installation is Completed
Please Check on Terminal by typing clamtk

Cronjob Details
00 22 * * * Path-Script/clamav-scan.sh (Every Day Night 11PM)

Path Details
clamscan -r /home
clamscan -r /var
clamscan -r /root

Output Details
clamscan -r /var/www
/var/www/html/index.html: OK

Scan Summary
Known viruses: 3965211
Engine version: 0.98.7
Scanned directories: 2
Scanned files: 1
Infected files: 0
Data scanned: 0.01 MB
Data read: 0.01 MB (ratio 1.00:1)
Time: 15.603 sec (0 m 15 s)

874_big
ClaimAV Antivirus

OSTicketing Information


OSTicket System
OSTicket comes with its own web-based installer to help guide you through the installation process without the frustration. While the installer provides step by step guide during the installation process, its important and helpful to have general knowledge about Web servers, PHP and MySQL.

ost1

Prerequisites
To install osTicket, your web server must have PHP 5.3 (or better) and MySQL 5 (or better) installed. If you are unsure whether your server meets these requirements, please check with your host or webmaster before proceeding with the installation.

You will need one MySQL database with valid user, password and hostname handy during installation. MySQL user must have FULL privileges on the database. If you are unsure whether you have these details or if the user has sufficient permissions, please consult your host or database admin before proceeding.

Windows Recommended Links
PHP 5.3 for Windows Server via WPM
http://www.microsoft.com/web/gallery/install.aspx?appid=PHP53

MariaDB 5.5 for Windows Server 64-bit | 32-bit
https://downloads.mariadb.org/interstitial/mariadb-galera-5.5.45/source/mariadb-galera-5.5.45.tar.gz/from/http%3A//mirror.jmu.edu/pub/mariadb

PHP Manager for IIS (makes managing PHP on IIS much easier)
http://phpmanager.codeplex.com/downloads/get/253208

 

Checking Local IP is UP (or) DOWN


Checking Local IP is UP (or) DOWN :
————————————————–
An Internet Protocol address (IP address) is a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol for communication. An IP address serves two principal functions: host or network interface identification and location addressing. Its role has been characterized as follows: “A name indicates what we seek. An address indicates where it is. A route indicates how to get there.”

Checking Local IP Automated Script :
—————————————————
#!/bin/bash
for ((n=0 ; n < 30 ; n+=1))
do
ip=192.168.1.$n
if ping -c 1 -w 1 $ip > /dev/null 2> /dev/null >> /etc/logping.txt; then
echo “${ip} is up”
else
echo “${ip} is down”
fi
done
is_alive_ping $i & disown
done

Output Details :
——————–
Output –> It will display like “Local Network is Up”

192.168.1.0 is down
192.168.1.1 is up
192.168.1.2 is up
192.168.1.3 is up
192.168.1.4 is down
192.168.1.5 is up
192.168.1.6 is down
192.168.1.7 is down
192.168.1.8 is down
192.168.1.9 is down
192.168.1.10 is down
192.168.1.11 is down
192.168.1.12 is down
192.168.1.13 is down
192.168.1.14 is down

NOTE –> I Just Specified “Local IP-Address” But Actually Your Local IP Address will be Display there.

Local IP-Address will Display :
—————————————–
#!/bin/bash

IP=”$(ifconfig | egrep ‘inet ‘ | sed -e ‘s/inet //’ -e ‘s/addr://’ -e ‘s/ Bcast.//’ -e ‘s/127.//’)”
echo $IP

Output Details :
———————
It Will Display Local IP-Address

Output –> Local IP Address 192.168.1.5

How to Backup /home Dir


#!/bin/bash

P=’/home/backup’

if [ -d “$P” ]
then
cd /
sudo tar cvpzf “$P/home-backup-date +%d.%m.%Y.tar.gz” –one-file-system –exclude-tag-under=.ignorebackup –exclude=/proc –exclude=/media –exclude=/lost+found –exclude=/sys –exclude=/tmp –exclude=/mnt –exclude=/media –exclude=/dev –exclude-caches-all /
else
echo -e “Invalid folder: $P\n”
exit 1
fi

echo -e “\nDone.\n”
exit 0

Path Details
/home/backup

Output Details
/home/backup/
“home-backup-date.tar.gz”

IPv6 Disabling


What is IPV6 :
——————
Internet Protocol Version 6 (IPv6) is a network layer protocol that enables data communications over a packet switched network. Packet switching involves the sending and receiving of data in packets between two nodes in a network. The working standard for the IPv6 protocol was published by the Internet Engineering Task Force (IETF) in 1998. The IETF specification for IPv6 is RFC 2460. IPv6 was intended to replace the widely used Internet Protocol Version 4 (IPv4) that is considered the backbone of the modern Internet. IPv6 is often referred to as the “next generation Internet” because of it’s expanded capabilities and it’s growth through recent large scale deployments. In 2004, Japan and Korea were acknowledged as having the first public deployments of IPv6.

IPv6 is the next generation Internet Protocol (IP) address standard intended to supplement and eventually replace IPv4, the protocol most Internet services use today. Every computer, mobile phone and any other device connected to the Internet needs a numerical IP address in order to communicate with other devices.  The original IP address scheme, called IPv4, is running out of numbers.  Please see the Internet Society IPv6 Fact Sheet or  our IPv6 Basics page for more information and background on IPv6.  Our list of IPv6 statistics sites can also show you the most recent trends in growth of IPv6 usage.

IPv6 Features :
——————–
1) New header format

2) Large address space

3) Efficient and hierarchical addressing and routing infrastructure

4) Stateless and stateful address configuration

5) Built-in security

6) Better support for quality of service (QoS)

7) New protocol for neighboring node interaction

8) Extensibility

IPv6 Disabling Script :
——————————
#!/bin/bash

clear
int=$(netstat -i | cut -d” ” -f1 | egrep -v “^Kernel|Iface|lo|:” |head -1)

ip -6 addr show dev $int |cut -b 5-9 >/tmp/ipp

grep “inet6” /tmp/ipp >/dev/null 2>&1 && ip_v=1 || ip_v=0

i6=$(ip addr show dev $int | sed -e’s/^.inet6 ([^ ])\/.*$/\1/;t;d’)
if [ $ip_v -eq 1 ]

then
echo “echo IPv6 found…”;
echo “The IPv6 address is $i6”;
echo “Disabling IPv6 address…”;
echo “net.ipv6.conf.all.disable_ipv6 = 1” >> /etc/sysctl.conf
echo “net.ipv6.conf.default.disable_ipv6 = 1” >> /etc/sysctl.conf
echo “net.ipv6.conf.lo.disable_ipv6 = 1” >> /etc/sysctl.conf
sysctl -p
echo “IPv6 address disabled”
else
echo “IPv6 is already disabled”

fi

rm -f /tmp/ipp

PHPMyAdmin


PHPMyadmin :
——————
phpMyAdmin is an open source tool used for the administration of MySQL. In addition to offering the capability to perform administration tasks such as creating, editing, or deleting databases, and managing users and permissions, phpMyAdmin provides a graphical user interface to do all of these tasks

Features of phpMyAdmin :
———————————
1) Friendly web interface
2) Supported most of the MySQL features
3) Browse and drop databases, tables, views, fields and indexes.
4) Create, copy, drop, rename and alter databases, tables, fields and indexes
5) Manage MySQL users and there privileges
6) Import data from CSV and SQL
7) Administering multiple servers

Output Details :
——————-
Output –> http://IP-Address/phpmyadmin

Manual Installation :
————————-
sudo apt-get update

sudo apt-get install phpmyadmin

sudo service apache2 restart

Phpmyadmin Script for Ubuntu :
—————————————–
#!/bin/bash

echo “System Update”

sudo apt-get update

echo “Install phpMyAdmin”

sudo apt-get install phpMyAdmin

echo -e “Web server to Re-Configure automatically –> Click on Apache2”

echo -e “Configure Database for Phpmyadmin with dbconfig-common –> yes”

echo -e “Password for the database administrative user –> Password”

echo -e “Mysql application password for Phpmyadmin –> password”

echo “Re-Starting Apache Service”

service apache2 restart

echo “Installation is Completed”

echo -e “Please check with http://Ip-address/phpmyadmin&#8221;

echo -e “Login Details: Use MySQL Username & Password”

Changing Mac Address in Linux


How to Change the MAC address with ifconfig
ifconfig eth0 down hw ether AA:BB:CC:DD:EE:FF && ifconfig eth0 up
(or) Else
ifconfig eth0 down
ifconfig eth0 hw ether AA:BB:CC:DD:EE:FF
fconfig eth0 up

How to Change the MAC address with iproute2
ip link set down dev eth0
ip link set dev eth0 address AA:BB:CC:DD:EE:FF
ip link set up dev eth0

Changing Mac address with macchanger Command
sudo apt-get install macchanger
ifconfig eth0 down
macchager -m AA:BB:CC:DD:EE:FF eth0
ifconfig eth0 up

Changing Mac Address Script
#!/bin/bash
ifconfig -a | grep HWaddr
ifconfig eth0 down
ifconfig eth0 hw ether New Mac Address
ifconfig eth0 up
ifconfig eth0 |grep HWaddr

Output Details
After Changing the Mac Address from 94:de:80:32:a9:47 to 94:de:80:32:a9:46
Checking Hardware Address
eth0      Link encap:Ethernet  HWaddr 94:de:80:32:a9:47
Changing New Mac Address
Checking Hardware Address
eth0      Link encap:Ethernet  HWaddr 94:de:80:32:a9:46

Mac Address Changing