Request a MicroPIC Demo
Linked InVonoa Blog

VSOURCE integrated geomapping

VONOA releases an update that provides real-time geomapping of threats within the VSOURCE portal. Geomapping is an efficient display mechanism for rapid response to global risks.

VONOA GeoMapping

Posted in News | Leave a comment

Configure sendmail to deliver without server hostname

The default sendmail configuration appends the server hostname within the fqdn and may be rejected by mail servers. E.G. sender@hostname.domainname.com

To send as sender@domainname.com you can use the masquerade configuration included below.

1. Update your domain name and include the below text within /etc/mail/sendmail.mc

vi /etc/mail/sendmail.mc

MASQUERADE_AS(DOMAINNAME.com)dnl
FEATURE(masquerade_envelope)dnl
FEATURE(masquerade_entire_domain)dnl
MASQUERADE_DOMAIN(DOMAINNAME.com)dnl

2. Convert the sendmail.mc to a proper sendmail.cf file

m4 sendmail.mc > sendmail.cf

3. Restart sendmail

/etc/init.d/sendmail restart

Posted in Commands | Leave a comment

Configure sendmail to use an external SMTP relay

This configuration example will direct all mail sent to a local sendmail server out to a defined SMTP relay server.

1. Edit sendmail configuration file

vi /etc/mail/sendmail.mc

2. Update mail server and add the following line right before “MAILER_DEFINITIONS” near the bottom of the default mc file. Note the proper quote usage starting with a ` and ending with a ‘.

define(`SMART_HOST’, `mailserver.domain.com’)dnl

3. Convert the mc file to a proper sendmail.cf file

cd /etc/mail/

m4 sendmail.mc > sendmail.cf

4. Restart sendmail

/etc/init.d/sendmail restart

Posted in Commands | Leave a comment

Allow internal relay on a Zimbra server

You can enable internal hosts to use your Zimbra mail server for relaying using the zmprov command. Be careful not to include networks outside of your trusted ranges. Although this command is considered safe it is recommended to backup your mail server before making any configuration changes.

1. Authenticate as root on your Zimbra server.

2. Identify the path of the zmprov command.

locate zmprov

3. Change directory to the directory where zmprov exists.

cd /opt/zimbra/bin/

4. Update the servername or domain name and internal networks that you want to enable for internal relaying. Note that if you don’t have the server or domain name correct it will notify you that the syntax is incorrect.  This name will be unique to your installation.

./zmprov modifyServer DOMAIN.COM zimbraMtaMyNetworks ’127.0.0.1 192.168.1.0/24 192.168.2.0/24 192.168.3.0/24′

Note: use standard single quotes when identifying the relay source networks.

Posted in Commands | Leave a comment

Ftp delete directories that are not empty

The ftp rm command doesn’t allow you to delete directories that are not empty resulting in error: The directory is not empty

The lftp client will allow you to delete all files and directories even if they are not empty.

Example:

lftp -u user,pass serverip

set ftp:list-options -a

cd /foldername/

glob -a rm -r *

Posted in Commands | Leave a comment

Vyatta Null Blackhole Route

Want to quickly restrict communication for an attacking source?   Add a null (or blackhole) route in Vyatta:

1. SSH into router/firewall

2. type “configure”

3. Update the ip address and subnet mask and apply the below configuration. In this example a /32 is used to specify a single IP address:

set protocols static route xxx.xxx.xxx.xxx/32 blackhole

4. type “apply”

5. type “save”

Posted in Commands | Leave a comment

How to disable SSLv2 in IIS7

Backup your registry before trying any steps listed below!

Steps to disable SSL v2 in IIS7

 

The following registry entries can be made to disable SSLv2

1. Open a command prompt and enter the following lines

REG ADD “HKLM\System\CurrentControlSet\Control\SecurityProviders\SChannel\Protocols\SSL 2.0\Server” /v Enabled /t REG_DWORD /d 0 /f

REG ADD “HKLM\System\CurrentControlSet\Control\SecurityProviders\SChannel\Protocols\SSL 2.0\Client” /v Enabled /t REG_DWORD /d 0 /f

REG ADD “HKLM\System\CurrentControlSet\Control\SecurityProviders\SChannel\Protocols\SSL 3.0\Server” /v Enabled /t REG_DWORD /d 1 /f

REG ADD “HKLM\System\CurrentControlSet\Control\SecurityProviders\SChannel\Protocols\SSL 3.0\Client” /v Enabled /t REG_DWORD /d 1 /f

REG ADD “HKLM\System\CurrentControlSet\Control\SecurityProviders\SChannel\Protocols\TLS 1.0\Server” /v Enabled /t REG_DWORD /d 1 /f

REG ADD “HKLM\System\CurrentControlSet\Control\SecurityProviders\SChannel\Protocols\TLS 1.0\Client” /v Enabled /t REG_DWORD /d 1 /f

2. Reboot server

3. Test to make sure SSLv2 is now disabled

Posted in Commands | Leave a comment

MySQL Report Script

The example script will prompt user for MySQL credentials and report: | TABLE_NAME | NUM_COLS | NUM_ROWS | COLUMN_NAMES

  1. Copy the script below into a file (e.g. dbreport.sc)
  2. Make script executable: chmod +x dbreport.sc
  3. Answer authentication prompts

##################

#!/bin/bash
#Request user input for variables
read  -p “DataBase Host: ” var1
read  -p “MySQL User: ” var2
read  -p “MySQL Password: ” var3
read  -p “Database Name: ” var4
#Prepare
MYSQL=`which mysql`
#Execute
$MYSQL -u”$var2″ -p”$var3″ -h”$var1″ -e”
SET group_concat_max_len=128;
SET @DB=’$var4′;
SELECT
   C.TABLE_NAME,
   COUNT(*) AS NUM_COLS,
   TABLE_ROWS AS NUM_ROWS,
   GROUP_CONCAT(COLUMN_NAME) AS COLUMN_NAMES
FROM
   INFORMATION_SCHEMA.COLUMNS C,
   INFORMATION_SCHEMA.TABLES T
WHERE
   C.TABLE_SCHEMA = T.TABLE_SCHEMA
AND
   C.TABLE_NAME = T.TABLE_NAME
AND
   C.TABLE_SCHEMA = @DB
GROUP BY
   C.TABLE_NAME
ORDER BY
   C.TABLE_NAME
;”

##################

Posted in Uncategorized | Leave a comment

Javascript Toggle Button

VONOA example: Javascript Toggle Button

This script displays a button icon and uses an “on” and “off” image to represent a toggle function. In this example when the button is clicked it launches a hidden iframe for streaming a music popup window. Enjoy!

<script language=”javascript”>
function toggle() {
        var ele = document.getElementById(“toggleText”);
        var text = document.getElementById(“displayText”);
        if(ele.style.display == “block”) {
                ele.style.display = “none”;
                text.innerHTML = “<img src=’/images/off.png’ style=’margin: -8px 0px 0px 0px’ BORDER=0>”;
        }
        else {
                ele.style.display = “block”;
                text.innerHTML = “<img src=’/images/on.png’ style=’margin: -8px 0px 0px 0px’ BORDER=0>”;
        }
}
</script>

<a id=”displayText” href=”javascript:toggle();”><img src=”/images/off.png” style=”margin: -8px 0px 0px 0px” BORDER=0></a>
<div id=”toggleText” style=”display: none”><iframe id=”iframe” src=”http://TEST.com/popup/?music” frameBorder=”0″ width=”0″ height=”0″></iframe></div>

Posted in Commands | Leave a comment

Create MySQL Database Script

Simple script example to create MySQL database, grant privileges and prompt for variables:

  1. Copy script below into createdb.sc
  2. Update the appropriate grant privileges
  3. Enable execution: chmod +x createdb.sc
  4. Execute script: ./createdb.sc

######################################################

#!/bin/bash
# VONOA example – request user input for variables
read  -p “DataBase Host: ” var1
read  -p “MySQL Root User: ” var2
read  -p “MySQL Root Password: ” var3
read  -p “New Database Name: ” var4
read  -p “New Database User: ” var5
read  -p “New Database Password: ” var6
#Prepare
MYSQL=`which mysql`
Q1=”CREATE DATABASE IF NOT EXISTS $var4;”
Q2=”GRANT SELECT, INSERT, DELETE, UPDATE ON $var4.* TO ‘$var5′@’$var1′ IDENTIFIED BY ‘$var6′;”
Q3=”FLUSH PRIVILEGES;”
SQL=”${Q1}${Q2}${Q3}”
#Execute
$MYSQL –user=$var2 –password=$var3 -h $var1 -e “$SQL”

######################################################

Posted in Commands | Leave a comment