Posts Tagged ‘complexity’

Installation and Configuration of Clamav antivirus on Debian GNU / Linux

Monday, September 9th, 2013

Clamav logo installing Clamav antivirus to scan periodically Debian server websites for viruses

Clamav Antivirus is one of must have packages installed on a new Debian Linux server. It is not only necessary whether configuring a new Mail server be it Qmail or Postfix but is good to have to always check files on a Webserver. Until few years infecting of Sites with Viruses / Installing WebShells or Backdooring for further access using Perl or PHP vulnerable PHP code was not so common, However nowadays with increase of complexity of languages and increase of not security minded programmers this possibility dramatically increaed. Thus nowadays, whether I configure a new Apache + PHP + CGI support server I always install Clamav AV. Some might argue that Clamav Virus definitions are still too little compared to proprietary solutions like BitDefender / AVG or Avast but since my experience with this under Linux is not so bright as well as Clamav captures essential Viruses and Backdoors I still prefer to keep on with Clamav.  Even on home Desktops with Linux clamav is of use as there are plenty of free-ware software for Linux which come only distributed only in a binary form and hence its good to check them with clamav before use whether they don't contain some well known Rootkit or Virus. Over the years Clamav has done great job for me whether I had to clean up "hacked" hosts containing  script kiddie exploit scanners or Virus infected ELF binaries
.
1. Installing ClamAV in Debian Wheezy Linux

Before time there was a separate Debian repository called Volatille providing latest version release of Clamav, since Debian Squeeze Volatille project is discontinued, thus installing on Wheezy as a deb package is only available via standard Debian repositories.

apt-get update && apt-get --yes upgrade
...

apt-get install --yes clamav clamav-daemon

As package dependencies you get installed:

clamav clamav-base clamav-freshclam libbz2-1.0 libclamav1 libcurl3 libidn11 ucf

Clamav-Daemon will launch immediately after packages are installed and is available as process name /usr/sbin/clamd

# ps ax |grep -i clam
 2641 ?        Ssl    6:39 /usr/sbin/clamd
 2791 ?        Ss    12:04 /usr/bin/freshclam -d --quiet
12300 pts/0    S+     0:00 grep -i clam

2. Updating Clamav Antivirus Definitions

Its worthy say few words on clamav-freshclam as it is part of ClamAV which is used to update Clamav Virus definitions. Update of ClamAV vir definitions are updating automatically through /usr/bin/freshclam daemon which is started automatically by Debian postconfiguration scripts right after Clamav install.

Manual update of AV definitions can be done also with freshclam.

# freshclam
ClamAV update process started at Sun Sep  8 17:48:36 2013
main.cvd is up to date (version: 54, sigs: 1044387, f-level: 60, builder: sven)
daily.cvd is up to date (version: 17830, sigs: 1696886, f-level: 63, builder: neo)
bytecode.cld is up to date (version: 225, sigs: 42, f-level: 63, builder: dgoddard)


To keep an eye on definition auto-updates (useful to check where something fails), check out in /var/log/clamav/freshclam.log

A sure indication that Anvirus updates are conducting fine should be log records like:
 

Sun Sep  8 16:27:44 2013 -> ————————————–
Sun Sep  8 17:27:44 2013 -> Received signal: wake up
Sun Sep  8 17:27:44 2013 -> ClamAV update process started at Sun Sep  8 17:27:44 2013
Sun Sep  8 17:27:44 2013 -> main.cvd is up to date (version: 54, sigs: 1044387, f-level: 60, builder: sven)
Sun Sep  8 17:27:44 2013 -> daily.cld is up to date (version: 17830, sigs: 1696886, f-level: 63, builder: neo)
Sun Sep  8 17:27:44 2013 -> bytecode.cld is up to date (version: 225, sigs: 42, f-level: 63, builder: dgoddard)
Sun Sep  8 17:27:47 2013 -> ————————————–



3. Configuring ClamAV

For Desktop use clamav default config is pretty good. However for servers its good to raise  2 up MaxThreads:

By default MaxThreads is 12

MaxThreads 12

Change to from 30 to 80 depending on how powerful machine ClamAV runs, even on some servers more Clamav threads might be necessary

MaxThreads 30

Other value I like changing is SelfCheck 3600 is too long time for clamav Virus definitions integrity I prefer to set it to 600, i.e.

SelfCheck 600

By default ClamAV is also configured to scan archive files as well. However for this to work you will have to have previously installed unzip and unrar on system. If still you don't have them installed run:

# apt-get install --yes unrar unzip
...

Note that you will need to have non-free part of Debian deb repositories to /etc/apt/sources.list

Here is one of my sources.list
 

deb http://ftp.uk.debian.org/debian squeeze main contrib non-free
deb http://security.debian.org/ squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main contrib non-free

deb http://ftp.debian.skynet.be/ftp/debian/ squeeze main contrib non-free
deb-src http://ftp.debian.skynet.be/ftp/debian/ stable main contrib non-free

deb http://security.debian.org squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main contrib non-free

3. Scanning with ClamAV

# clamscan -r /tmp/
./dos-58.160.208.43: OK
./dos-108.18.38.140: OK
./dos-188.194.80.100: OK
./dos-91.224.160.135: OK
./dos-128.253.117.70: OK
./dos-128.172.143.110: OK
./dos-77.92.102.34: OK
./dos-195.230.5.12: OK
...

....
----------- SCAN SUMMARY -----------
Known viruses: 2735887
Engine version: 0.97.8
Scanned directories: 1
Scanned files: 129
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 4.769 sec (0 m 4 s)


-r flag stands for recursive scan – e.g. scan all sub-directories in directory and its content

To not flood your console / ssh connection one very useful option is -i (print only whetherinfected files are matched). Here is one more sample case:

# clamscan -r -i /var/tmp/
----------- SCAN SUMMARY -----------
Known viruses: 2735887
Engine version: 0.97.8
Scanned directories: 1
Scanned files: 2
Infected files: 0
Data scanned: 0.26 MB
Data read: 0.13 MB (ratio 1.97:1)
Time: 4.824 sec (0 m 4 s)


Whether you're on a physical server console and it has pc speaker or sound blaster use –bell option to ring a bell every time a Virus infection is found, for exmpl.

# clamscan -r -i --bell /var/www/

4. Scanning periodically and reporting with ClamAV directories with websites

A very common use of ClamAV is to just setup a scheduled cronjob once a month to scan, whether server folder containing a bunch of websites in separate Virtualhosts contain some viruses or malicious stuff. Then as administrator check those logs once a month to make sure server site or group of sites does not become banned in search engine (blocked by Google Chrome and Firefox as Virus hotbed) …
# crontab -u root -e
00 02 01 * * clamscan -r /var/www -l /var/log/websites-scan.log

Then once a month check out /var/log/websites-scan.log

How to make VPN PPTP (Point to Point Tunnel) Server on Debian Wheezy GNU / Linux

Thursday, September 5th, 2013

VPN pptp server linux debian logo

Creating VPN server for allowing users to connect is as early practice as the internet was used over Dial-Up modems. PPTP Connections were useful for separating user accounts traffic and easily keeping an eye on who connects to a server via phone line. Besides that VPN tunnels allows the user to connect to every possible running service locally on the server, meaning whether a user opens a VPN (PoPTOP) connection to the VPN server there is no need for port forwarding to local running server services.

Other advantages of plain VPN connection is it is a good way to grant access of Remote host not belonging to a network to have access to a distant local network using the internet as well as it is ultra easy to configure and use.
Even better PPTP is supported by virtually almost any modern operating system including all versions of Microsoft Windows.

As connection between client -> server is insecure and only password is transferred securily there is no complexity of SSL Certificate generation and Exchange like for instance whether configuring to use OpenVPN tunnel, IPsec or L2TP+IPsec.

Besides the many upmentioned advantages, there are some disadvantages of PPTP as it is unsecurely transferring data between VPN Client and VPN server.

After this short intro, here is how easy is to configure PPTP.

1. Install pptpd deb package

apt-get install pptpd

2. Edit /etc/pptpd.conf

vim /etc/pptpd.conf

Place near end of file:

localip 10.10.10.1
remoteip 10.0.10.2-250

localip variable sets local VPN server main IP and remoteip sets range of IPs in which VPN clients will be assigned IPs. As you see clients IPs will be assigned from;
10.0.10.2 to 10.0.10.250 .

Some other reasonable values for localip and remoteip are:

localip 192.168.1.6
remoteip 192.168.1.150-183,192.168.1.244


As you see it is possible to set only a set of few ranges of IP in class C network to be assigned new IPs on connect to PPTPD server.


3. Modify /etc/ppp/pptpd-options configuration

ms-dns 8.8.8.8
ms-dns 8.8.4.4
nobsdcomp
noipx
mtu 1490
mru 1490

I prefer setting Google's Public DNS for VPN clients use (ms-dns 8.8.8.8 … etc.), as they are often more reliable than provided ones by ISPs, however others might be happier with custom ones as they might be quicker to resolve.

4. Edit chap-secrets to place client authentication usernames and passwords

File should look something like:

# Secrets for authentication using CHAP
# client           server         secret                          IP addresses
internet pptpd qwerty

For multiple VPN users just add all user usernames and passwords. If you want to assign certain username IPs from above pre-selected range put write it too.

5. Restart PPTPD server script

/etc/init.d/pptpd restart
Restarting PPTP:
Stopping PPTP: pptpd.
Starting PPTP Daemon pptpd.

By default PPTP server listens for network connections via port 1723. If server launches properly port 1723 should be listening for connections.

netstat -etna|grep -i 1723
tcp       0           0          0.0.0.0:1723                  0.0.0.0:*               LISTEN       0        32810

6. Enable VPN server access to all nodes on local network

Enabling PPTP Client to access the whole network is tricky and very bad security practice especially if VPN server is not behind DMZ. Anyways allowing a client to all local network computers is often needed. This is done via;

enabling IP Forwarding

To do so add in /etc/sysctl.conf

net.ipv4.ip_forward=1

i.e. exec:

echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf

sysctl -p

That's all now PPTP is ready to accept connections. I will not get into details how to configure VPN PPTP Connection from Windows host as this is an easy task and there are plenty of good tutorials online.
Cheers 😉

Color Trick Microsoft and Google use to keep their users loyal and happy unwalfully

Tuesday, June 12th, 2012

Color mind influence has been longly researched. It is researched and there are some findingings on how we people react on colors. This researches are not much known and most of them are not put on the internet (??) One model claiming to have explained how colors influence is called HBDIHerrmann Brain Dominance Instruments.

In the picture beginning of this post, I have presented a quick "Personal Profile" of HBDI on how one think in order to determine in "which colors" one tends to think more ___

In short HBDI model claims to explain how people think in another model.
My personal view of it is it is like most science nowdays more based on faith than on a clearly conducted scientific research and facts. We know pretty well many people tried to explain how brain operates and many people give models to explain it however none of the models could grasp in completeness the complexity of human brain. Hence Businessman people who use this model in their daily life and they push it to us has put the model in action not that they know it is working but rather they believe it does .., Saying this few words as introduction I will contninue onwards to explain you about HBDI as in the business world it is considered as a "Strategic Asset" for a company success. Hence the use of richest companies of the model has a serious impact on us the common people and unknowing (uninformed) computer users.

Some of the companies who integrated the HBDI to their models we all know are of course not strangely Microsoft and Google
;;;

Below I present you a picture showing the HBDI The Whole Brain Model |||

HBDI The whole brain model

Next I show you Microsoft Windows OS worldly "infamous" flag |||

Microsoft Windows OS Flag

You can see for yourself the basic color from HBDI WHOLE brain model are integrated in the Microsoft flag, only the order of colors present and the color gamma is different;;;;

The basic colors in HBDI model to explain how human brain works is separated in 4 segments as you can see from above screenshot. There are a number of tests one can do to determine what is his exact HBDI profile, and in abstract terms in which kind of colors he prefers to think.

There are a whole "army" of people involved into this sect like philosophy (I call it philosophy as surely every model that tries to explain everything is doomed to fail it is the nature in which God created the universe so complex and he put us be part of it and not controllers of it that any Universal model trying to explain it has never succeeded so far. The HBDI has some fruits for the only reason it is believed to work well by the people with money.

As you see in the colors HBDI claims there are 4 segments corresponding to four basic colors

  • BLUE
  • YELLOW
  • GREEN
  • RED

Each of the colors is an indicator on how the person tends to think the BLUE people as HBDI practicioners (believers) calls them are —

Analytical, Fact Based, Logal, Quantitative

The YELLOW oriented people are claimed to be —

Holistic, Intuitive, Integrating, Synthesizing

The GREEN ones in model terms are interested in —

Organizing, Sequentiality, Planning, Detailizing facts

Finally the RED Ones are said to be —

Interpersonal, Feeling based, Kinesthetic, Emotional

Now as you can understand this model though it looks like promising is based on a philosophy which rejects the existing of spirit realm God Angels or good or evil. It claims everything we're are or we want to be can be achieved following the HBDI to develop your own brain.

This model as every human made model however does reject the fact that besides internal factors and brains we're put into external environment most of which we cannot control and therefore even if we try our best to have certain goals and complete them the external uncontrolled facts can be a reason to stop us to complete our goals.

Now back to my point, that Google, Microsoft and probably many other products and physical goods are heavily using the HBDI color scheme ;;;
Here is the Google Inc. Logo the color trait of HBDI is there:

Google Search Engine Logo and HBDI 4 colors embedded

For those doubting that Google Inc. and Microsoft Inc. are along the false believers of HBDI color scheme brain ideology I present below the Logo of Google Web Browser =- Google Chrome

Google Web Chrome Browser Logo 4 colors HBDI microsoft flag

It is evident 4 colors used as a main ones in the HBDI tool are present in Google Chrome just like in Microsoft Windows logo flag, the only difference is in the order of colors.
Also it is interesting the name Chrome that Google Chrome took is most likely taken from Aldous Huxley's – Brave New World (A book depicting a short future highly conditioned society) , the book story line goes around a society programmed to do the things they do.

I assume it is very likely that Google's founders Sergey Brin or some of their subordinate working for Google are very much into the idea of conditioning people just like in the book and this is most likely the reason they choose the Chrome as a title for Google's browser ,,,

The 4 Colors from HBDI yellow, green, blue, red are embedded also in the google .ico file (the little icon showing in browser URL bar), below is a screenshot of a tab where google is opened showing the .ico image:

Google Icon 4 colors Linux Debian Epiphany Browser tab screenshot

Do you remember the good old Windows XP start button, have you noticed the Windows flag embedded in it, if not let me show you;;;

Microsoft Windows XP Start Button and HBDI 4 colors scheme

But wait the Windows flag placed on the left bottom of Ms Windows-es is not only on XP it is also on Windows 3.11 cover, Winblows 98, Vista, Windows 2003, Windows 2007 and actually all the M$ operating systems ever produced since the very early days M$ become a top OS producer :::

Windows 3.11 Operating system logo flag

Microsoft Windows 95 4 colors flag and blue sky

Here is also the 4 colored (a bit like Nazi like looking) flag on M$ Win-doze 7 |||

MS Windows 7 start Menu m$ windows well known flag

Also the Microsoft Flag is positioned on the bottom left screen on purpose. It is well known fact that most of the world (except Arabic) are used to read the text from Left to Right

, therefore it is natural for our eyesight to look for the text on the left side. I just wonder why they placed the START on the bottom and not on top. It is natural we read text and books from the most top to the most bottom ,,,.,

Even Apple Computers nowdays Macs has most likely used the HBDI as the main 4 colors and some gamma from rainbow colors are present on their Classical Apple Computer logo

Old Apple Computer/s logo colors of rainbow 4 hbdi colors are there

Makes me wonder if Jobs employed the HBDI model in his company. Well what is the reason for people loving so much this rainbow colors combination. If we think for a second outside of HBDI's brainwashing ideology for what each color would stand for. Well it is simple is comes from our young years most of the people between age 2 and 50 years has been more or less exposed to the so colorful Kids Cartoons, which are all so colorfully painted. Since our very early age we've placed in us a love for colorfulness outlook (well again not all of us for example I prefer less colors, I'm sure there are plenty of people who don't like the heavy colors we see in almost everywhere around us).

The problem with this 4 colors use on purpose and all this unnatural color placing everywhere is that it is unnatural and not in good synergy with our surrounding natural environment. Therefore I personally think using a colorful color paintings on everywhere in both computer programs and the physical world plays us a bad joke and is one of the reasons so many people are on the virge to get crazy nowdays and many have already had already cracked out.

It is my firm believe more and more people should be educated on the harm of HBDI and the fact that, we're forced to 'live it' unwilfully every day by using even as "simple things" as computers and daily technology or buying food in the super market ,,,

Computers Technology use, Internet, Mobile Phones and all kind of technical screen based equipment alters negatively the human brain

Tuesday, April 26th, 2011

Computers Internet and Technology evil terminator picture

According to latest scientific research conducted in Stanford University USA .

People who actively use computers and internet has been the object of the research in 2009.

Social Networks, Tablets Smartphones etc. provides more and more possibilities for us to access information.

Most of modern people today tend to loose approximately between 8 and 10 hours a day either using Internet, a PC, Word-excel, their mobile phone or some kind of other mobile gadget like let’s say IPAD.

Most of today’s technologic goods we use to make our lives easier are multitasking.
The brain itself is not adjusted to work in such a multi-tasking mode as a direct consequence of being in contact with this multi-tasking for a long periods of time it gets altered.
Suddenly it starts being multitasking, or in other words starts processing information in parallel.

As the amount of information is constantly increasing online and we’re in contact with more and more information and moreover the altered way of our brains which starts working in multi-tasking the brain-overflows or (information brain overlow) is starting being more and more occuring event.

The consequence of this complexity is starting to impact us seriously as we tend to get addicted to technology usage and day by day it seems that the amount of information our brains are able to process is decreasing.

Logically enough the long-term consequence of a an internet addiction or any kind of technology addiction, plus the tremendous amounts of information we do think over daily is starting to show up the negative consequences on our psyche and (soul)

The brain starts changing the way it gets information as it adapts itself to “not remember”, as the information to be processed daily is so much that it couldn’t really comprehend it.

A good example for multi-tasking which if not all most of the users on the Internet today use daily is one of terriblest things ever created facebook, in my of my previous articles I’ve blogged about why social networks are big evil read it here and it seems this new information about brain altering caused bhy multi-tasking is just another supporting reason on why it’s better not to use social networks like facebook and twitter.

The endless amount of information according to the Stanford University research has prooven that the endless amount of information is pernicioufor our (brains) minds and is in many ways similar to the excessive amount of sugar in the body.

The scientiests which conducted the research does recommend to heavy computer and tech users (like me), to self-control themselves and be on a tech-diet (e.g. not use technology completely for at least 1 or 2 days every week).

Another serious damage which was prooven according to Stanford’s scientiests research was that people’s brains who have a severe exposure to internet or phone usage tend to have very serious problems with contentration and are very easily distracted.
This in a long term surely leads to a chaotic way of living obviously.
Suddenly it seems technology to be slowly becoming even more deadly and destructive than drugs.

Many people would say this kind of research is not true, but I can confirm that for instance many of the proven facts are things I have experiences myself in my daily life, so I believe what the research has prooven is mostly true.

This research was just another one after a month before other scientiests has prooven that Mobile Phone use leads to alteration of the brain chemistry
Apart from all the said negative consequences of use of technology for human brain is the problem with technology today heavily used as a way to spy on personal privacy I wonder be glad to hear in the comments section for other people like me who have problems with concentration and have a very short time memory (I myself have serious problem with that one).