General Security Discussions Discuss anything that is security related here.

InterN0T Affiliates:
EvilZonepy1337

SirCapsAlot.NET

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 15th January 2010, 00:28
Tsukasa's Avatar
-=Ninja Pirate=-
 
Join Date: Jun 2008
Location: ::1
Posts: 491
Rep Power: 14
Reputation: 319
Tsukasa is a light in the darkTsukasa is a light in the darkTsukasa is a light in the darkTsukasa is a light in the dark
Zabbix

Has anyone used this an tell me what they think? I don't have any test boxes atm to use but there is already plans to write AV monitors.

Thanks

zabbix.com

Update:
In the process of setting this up. Will report back what I think as well as my possible soon to be partner in business matters thinks.
__________________
"...a computer is a stupid machine with the ability to do incredibly
smart things, while computer programmers are smart people with the
ability to do incredibly stupid things. They are, in short, a perfect
match".

Last edited by Tsukasa; 15th January 2010 at 17:12.
Reply With Quote
  #2  
Old 16th January 2010, 21:58
Tsukasa's Avatar
-=Ninja Pirate=-
 
Join Date: Jun 2008
Location: ::1
Posts: 491
Rep Power: 14
Reputation: 319
Tsukasa is a light in the darkTsukasa is a light in the darkTsukasa is a light in the darkTsukasa is a light in the dark
Re: Zabbit

Installing zabbix ubuntu 9.10 server

Code:
sudo apt-get install build-essential gnustep-make
sudo apt-get install linux-headers-$(uname -r)
sudo apt-get install ntp ntpdate
sudo apt-get install mysql-server apache2 php5 php5-gd snmp libsnmp-dev libcurl4 libiksemel3 libiksemel-dev libmysql++-dev fping
create a new user for zabbix
Code:
sudo adduser zabbix
create database for zabbix
Code:
sudo mysql -u'user' -p'password'
mysql> create database zabbix;
mysql> exit
login under zabbix
Code:
su zabbix
cd /home/zabbix
get source
Code:
wget http://downloads.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/1.8/zabbix-1.8.tar.gz?use_mirror=cdnetworks-us-1

tar zxvpf zabbix*
cd zabbix*
Populate the database
Code:
cat create/schema/mysql.sql | mysql -u'user' -p'password' zabbix
cat create/data/data.sql | mysql -u'user -p'password' zabbix
cat create/data/images_mysql.sql | mysql -u'user' -p'password' zabbix
return to /home/zabbix/zabbix-1.8
Code:
cd ../..
configure options
Code:
sudo ./configure --enable-server --enable-agent --with-mysql --with-net-snmp --with-jabber=/usr/ --with-libcurl

sudo make install
add ports to /etc/services
Code:
sudo nano -w /etc/services

*add
zabbix_agent 10050/tcp
zabbix_trap 10051/tcp

*save and exit
create /etc/zabbix
Code:
sudo mkdir /etc/zabbix
sudo chown -R zabbix.zabbix /etc/zabbix/
cp misc/conf/zabbix_* /etc/zabbix/
edit /etc/zabbix/zabbix_agentd.conf
Code:
nano /etc/zabbix/zabbix_agentd.conf

*find Server=127.0.0.1 and change it to the machines ip
*find #ListenIP=127.0.0.1 and uncomment it and change to your machines IP
*save and exit
edit /etc/zabbix/zabbix_server.conf
Code:
nano /etc/zabbix/zabbix_server.conf

*find DBPassword=YOUR-DATABASE-PASSWORD
*find #ListenIP=127.0.0.1 uncomment and change to your machines IP
*save and exit
copy startup scripts
Code:
sudo cp misc/init.d/debian/zabbix-server /etc/init.d
sudo cp misc/init.d/debian/zabbix-agent /etc/init.d
change server config /etc/init.d/zabbix-server
Code:
sudo nano /etc/init.d/zabbix-server

*find DAEMON=/home/zabbix/bin/${NAME}
change to DAEMON=/usr/sbin/${NAME}
*save and exit
change agent config /etc/init.d/zabbix-agent
Code:
sudo /etc/init.d/zabbix-agent

*find DAEMON=/home/zabbix/bin/${NAME}
change to DAEMON=/usr/sbin/${NAME}
*save and exit
add server and agent to startup
Code:
sudo chmod 755 /etc/init.d/zabbix-server 
sudo update-rc.d zabbix-server defaults 
sudo chmod 755 /etc/init.d/zabbix-agent
sudo update-rc.d zabbix-agent defaults
copy frontend
Code:
mkdir /home/zabbix/web
cp -R frontends/php/* /home/zabbix/web/
Now we need to make it usable via apache
this assumes apache isn't hosting anything else so we are just going to edit 000-default
Code:
sudo nano /etc/apache2/sites-enabled/000-default


*Make it look kind of like this by changing what needs changing

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerSignature off
        DocumentRoot /home/zabbix/web/
        ServerName yourservername.com
        ErrorLog /var/log/apache2/zabbixweb.log
        <Directory />
                Order deny,allow
                deny from all
                Options None
                AllowOverride None
        </Directory>
        <Directory /home/zabbix/web/>
                php_Admin_value mbstring.func_overload 2
                php_value max_execution_time 300
                php_value post_max_size 16M
                php_value  memory_limit  128M
                Options None
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>
copy apps to /usr/sbin
Code:
cp /home/zabbix/zabbix-1.8/src/zabbix_agent/zabbix_agent /usr/sbin/
cp /home/zabbix/zabbix-1.8/src/zabbix_agent/zabbix_agentd /usr/sbin/
cp /home/zabbix/zabbix-1.8/src/zabbix_get/zabbix_get /usr/sbin/
cp /home/zabbix/zabbix-1.8/src/zabbix_sender/zabbix_sender /usr/sbin/
cp /home/zabbix/zabbix-1.8/src/zabbix_server/zabbix_server /usr/sbin/
restart apache and launch zabbix
Code:
/etc/init.d/apache2 restart
/etc/init.d/zabbix-server start
/etc/init.d/zabbix-agent start
Check if its running
Code:
ps aux | grec zabbix
Have fun
__________________
"...a computer is a stupid machine with the ability to do incredibly
smart things, while computer programmers are smart people with the
ability to do incredibly stupid things. They are, in short, a perfect
match".

Last edited by Tsukasa; 21st January 2010 at 02:48.
Reply With Quote
  #3  
Old 18th January 2010, 16:44
MaXe's Avatar
Studying shellcode..
 
Join Date: Jun 2008
Location: Sweden - Ljusdal
Posts: 3,433
Blog Entries: 36
Rep Power: 10
Reputation: 204
MaXe has made his way up the systemMaXe has made his way up the systemMaXe has made his way up the system
Re: Zabbit

Nice one, Zabbix looks pretty cool! +Rep
__________________

Quote:
Originally Posted by Norph
MaXe, I really doubt that you are able to browse ANY site more than 2 minutes before you start pwning it xD
Reply With Quote
  #4  
Old 19th January 2010, 08:00
s3my0n's Avatar
InterN0T Crew
 
Join Date: Sep 2009
Location: /home/s3my0n/
Posts: 374
Blog Entries: 3
Rep Power: 8
Reputation: 227
s3my0n has made his way up the systems3my0n has made his way up the systems3my0n has made his way up the system
Re: Zabbit

Nice tutorial Tsukasa, will be useful when I get around trying zabbix :]
__________________
Quote:
Computers are incredibly fast, accurate, and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination.
-Albert Einstein
Reply With Quote
  #5  
Old 21st January 2010, 03:37
Tsukasa's Avatar
-=Ninja Pirate=-
 
Join Date: Jun 2008
Location: ::1
Posts: 491
Rep Power: 14
Reputation: 319
Tsukasa is a light in the darkTsukasa is a light in the darkTsukasa is a light in the darkTsukasa is a light in the dark
Re: Zabbit

I don't take credit for this script this was written by the name eger. The script works well and uses zabbix_sender

Code:
serverName = "zabbix.mydoamin.com"
hostName = "web_server.mydomain.com"
zbxSender = "C:\Program Files\Zabbix Agent\zabbix_sender.exe"

updatesHigh = 0
updatesOptional = 0

Set objSearcher = CreateObject("Microsoft.Update.Searcher")
Set objSysInfo = CreateObject("Microsoft.Update.SystemInfo")
Set objResults = objSearcher.Search("IsInstalled=0")
Set colUpdates = objResults.Updates
Set WSHShell = CreateObject("WScript.Shell")

For i = 0 to colUpdates.Count - 1

    If (colUpdates.Item(i).IsInstalled = False AND colUpdates.Item(i).AutoSelectOnWebSites = False) Then
        updatesOptional = updatesOptional + 1
    ElseIf (colUpdates.Item(i).IsInstalled = False AND colUpdates.Item(i).AutoSelectOnWebSites = True) Then
        updatesHigh = updatesHigh + 1
    End IF
    
Next

updatesTotal = (updatesHigh + updatesOptional)

WSHShell.Exec zbxSender & " -z " & serverName & " -s " & hostName & " -k win_updates[total] -o " & updatesTotal
WSHShell.Exec zbxSender & " -z " & serverName & " -s " & hostName & " -k win_updates[high] -o " & updatesHigh
WSHShell.Exec zbxSender & " -z " & serverName & " -s " & hostName & " -k win_updates[optional] -o " & updatesOptional
WSHShell.Exec zbxSender & " -z " & serverName & " -s " & hostName & " -k win_updates[reboot] -o " & objSysInfo.RebootRequired

WScript.Quit 0
You will need to change variables serverName, hostName, and zbxSender. They are the Zabbix Server, Agent Hostname, and location of the zabbix_sender binary.

You will need to add a scheduled task to run this script as often as you want to get Windows Update data.
  1. Click to 'Add Scheduled Task' in the Scheduled Tasks window.
  2. For program to run, click the Browse button and locate the check_updates.vbs file and select it.
  3. Check to perform this task Daily or on a time schedule you want (customizable).
  4. For user to run as, enter in without the quotes, "NT AUTHORITY\SYSTEM", it doesn't need a password (or an administrator use if you wish).
  5. Right click on the schedule and clock 'Run' to have it send data to the Zabbix Server


Then create some new items for your Template or Host to use it. Create an item for each of these 3 keys:
  • win_updates[total]
  • win_updates[high]
  • win_updates[optional]
  • win_updates[reboot]

Settings for win_updates[total], win_updates[high], and win_updates[optional]:
  • Type: Zabbix trapper
  • Type of information: Numeric (unsigned)
  • Keep history: 7

Settings for win_updates[reboot]:
  • Type: Zabbix trapper
  • Type of information: Character
  • Keep history: 7

Triggers:

High priority updates:
Code:
{Your_Template:win_updates[high].last(0)}>0
Reboot required:

Code:
({Your_Template:win_updates[high].last(0)}=0)&({Your_Template:win_updates[reboot].str(True)}=1)
__________________
"...a computer is a stupid machine with the ability to do incredibly
smart things, while computer programmers are smart people with the
ability to do incredibly stupid things. They are, in short, a perfect
match".
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On



All times are GMT +2. The time now is 10:56.
Copyright ©2007 - Forever, InterN0T & Teh Unkwon

Hosted by 1and1