Tuesday, April 4, 2017

Manually Update Plugins on a Nessus Scanner (Windows)

I had an issue the other day with one of my Nessus Vulnerability Scanners which is being managed by Security Center. In Security Center the status of one of the Nessus scanners showed "Plugin Out of Sync". I tried to push the plugins to the Nessus scanner from the Security Center, but I was getting a status error of "Connection timed out".  So basically I was getting a latency issue on the connection. The Nessus scanner and the Security Center are in different states, so this may be why there is so much latency. I just built this Nessus scanner, so there were just too many plugins to be pushed over the wire by Security Center. To fix this issue, I just manually copied the plugins to the Nessus scanner. Then I manually loaded the plugins into the Nessus scanner. After I did this, I have not had this issue again.

Manually updating the Plugins can sometimes fix error or scanner status of "Protocol error". These instructions work on Nessus 5x and 6x, when managed by Security Center 4x or 5x.

Follow the instructions below to manually install plugins for the Nessus scanner on a Windows computer. For Linux computers click here.

1. Login to the Nessus scanner.

2. Open PowerShell or the Windows command line (CMD) as privileged user.

3. Stop the Nessus service
# net stop "Tenable Nessus"

4. Remove the Nessus scanner from Security Center

5. Reset the scanner
# …\Program Files\Tenable\Nessus>nessuscli fetch fix --reset

6. Connect the Nessus scanner
# …\Program Files\Tenable\Nessus>nessuscli fetch –security-center

7. Load the plugins into Nessus
# …\Program Files\Tenable\Nessus>nessuscli update plugins_file.tar.qz

8. Start the Nessus scanner
# net start “Tenable Nessus”

9. Login to the web interface for Nessus and verify that the configuration is complete.
https://localhost:8834

10. Login to the web interface for the Security Center. Add the Nessus scanner back and verify connectivity.

Your done.

Related posts
On this Blog

Monday, March 20, 2017

Turn off BEEP in BASH

Sometimes your on a computer that has speakers and if your on the termial it keeps beeping. This can be annoying if all your doing is using the tab key to use auto complete. Who ever thought that making the terminal beep was a good idea? Anyway below are some ways to get ride of the beeps.


In /etc/inputrc file add the line below.
set bell-style none

Put the line below in a profile. If you want to set it globally but in /etc/profile, otherwise set it in bash_profile, .bashrc, and/or .profile.
setterm -blength 0

This will make the beeping sound go away for good. If you have any questions or comments please post them below.

Wednesday, March 15, 2017

How to clear Nessus Plugin 42873 on Security Center

I use Security Center with Nessus scanners from Tenable to do vulnerability scanning on my servers. Sometimes the scanner finds hits on itself, such as a hit on plugin 42873 "SSL Medium Strength Cipher Suites Supported" on the Security Center. Below I show the steps needed to disable 3DES on Security Center..

To disable 3DES within Security Center do the following:
1. Open the file /opt/sc/support/conf/sslciphers.conf

2. Search for DES-CBC3-SHA

3. After the colon that precedes the above string, add an exclamation mark which is the signal to disable the given cipher.

4. The whole string should look like :!DES-CBC3-SHA:

Once complete, restart the SC service and complete a rescan and this vulnerability should be remediation.

To clear the other part of this hit, make sure the server is using SSL ciphers have encryption key length of over 112 bits. 

Reference Plugin 42873
https://www.openssl.org/blog/blog/2016/08/24/sweet32/

Monday, February 20, 2017

Rename & Combine Audio Book files into one audio book.

I like to listen to audio books and I get them them from places such as Audible, books on CD, the library or LibriVox. The issue is that all these places present the files to you in different ways. You can get one big file or a lot of small files. They all use different naming conventions which can make organizing your books difficult. To play my audio books I use the iBooks app from Apple and the Audible app form Audible, on my iPod Touch. Apples iBooks app works well but is missing some features that the Audible app has such as the bookmarking feature. The Audible app is really bad at playing books that are broken up into several files. The app will play the files out of order or show each file as a separate book.

So to fix the issues described above I recommend that you rename and/or combine all the files from one book into one file. Below I show the BASH script I wrote to fix this issue. I wrote and tested this script on a Mac. This script will also work on Linux and UNIX operating systems. After the files are combined the finder didn't show the right length for the audio book but when I imported the file into iTunes everything displayed right and the file worked fine.

The script below shows how to combine several MP3 files into one file. I put a comment after each command explaining what it is doing. If you have any questions about the script below ask it in the the comment section below.

script-book
Put contents of files here
#!/bin/bash
# This script was created on 20170216
# This script was created to combine MP3 files form audio books into one file.
# usage ./script-book bookname
#
if [ -z "$1" ]
  then
    echo -e "Please rerun the script with desired file name at the end \n 
              Example: ./script-book bookname"
    exit 1
fi
# The if statement checks for $1 variable. 
# If no variable is present then the gives error message and exits 

for s in $(ls |grep .mp3|egrep -v '(png|jpg)'|awk '{print $NF}')
# egrep removes pictures
# $NF gives the last column in the file name. This removes the spaces in the name.
do mv *$s $1$s
# This renames the files
cat *$s >> $1.mp3
# Cat combines the files
rm *$s
# Removes old files
done
ls -lh

In order to make the script work, copy it into the same directory the audio books files are located in. In the example below the script is called script-book and the ls command shows the script in the same directory as the audio book files.

man@earth> ls
The Hot Gate 001.mp3    The Hot Gate 021.mp3    The Hot Gate 041.mp3
The Hot Gate 002.mp3    The Hot Gate 022.mp3    The Hot Gate 042.mp3
The Hot Gate 003.mp3    The Hot Gate 023.mp3    The Hot Gate 043.mp3
The Hot Gate 004.mp3    The Hot Gate 024.mp3    The Hot Gate 044.mp3
The Hot Gate 005.mp3    The Hot Gate 025.mp3    The Hot Gate 045.mp3
The Hot Gate 006.mp3    The Hot Gate 026.mp3    The Hot Gate 046.mp3
The Hot Gate 007.mp3    The Hot Gate 027.mp3    The Hot Gate 047.mp3
The Hot Gate 008.mp3    The Hot Gate 028.mp3    The Hot Gate 048.mp3
The Hot Gate 009.mp3    The Hot Gate 029.mp3    The Hot Gate 049.mp3
The Hot Gate 010.mp3    The Hot Gate 030.mp3    The Hot Gate 050.mp3
The Hot Gate 011.mp3    The Hot Gate 031.mp3    The Hot Gate 051.mp3
The Hot Gate 012.mp3    The Hot Gate 032.mp3    The Hot Gate 052.mp3
The Hot Gate 013.mp3    The Hot Gate 033.mp3    The Hot Gate 053.mp3
The Hot Gate 014.mp3    The Hot Gate 034.mp3    The Hot Gate 054.mp3
The Hot Gate 015.mp3    The Hot Gate 035.mp3    The Hot Gate 055.mp3
The Hot Gate 016.mp3    The Hot Gate 036.mp3    The Hot Gate 056.mp3
The Hot Gate 017.mp3    The Hot Gate 037.mp3    The Hot Gate 057.mp3
The Hot Gate 018.mp3    The Hot Gate 038.mp3    The Hot Gate 058.mp3
The Hot Gate 019.mp3    The Hot Gate 039.mp3    The Hot Gate 059.mp3
The Hot Gate 020.mp3    The Hot Gate 040.mp3    script-book

Note- Make sure the script is executable before you run the command as shown below. Alternately you can also run the script by bash before the command if you don't know how to make the script executable. Example: bash ./script-book bookname

In the example below the I show how to execute the script and show example output. This shows that the script combined the files listed above and named the file TheHotGate and removed all the old unneeded files.

man@earth> ./script-book TheHotGate
total 447744
-rw-r--r--  1  arich   staff    219M  Feb 20 11:34    TheHotGate.mp3
-rw-r--r--  1  arich   staff    624B   Feb 20 11:33    script-book


I hope this helps anyone who is having a similar issue.


Links to places to get audio books.


LibriVox

             Audible