Search This Blog

Wednesday, December 11, 2013

.nessus reports merger AKA How to merge multiple Nessus reports (in .nessus file format)

I came across a situation when I had to merge several Nessus reports in a file, for the ease of vulnerability compilation and reporting. Turns out, it was just a google ('s/duckduckgo/google/g') search away.[0] :-)

Here-
  1. Keep the python script[1] along with .nessus files in the same directory.
  2. Run python script and a folder/file will be created nss_report/report.nessus.
Big thanks to mastahyeti for taking pain to create this wonderful script.

 ..............Done!!!

Reference(s) :
[0] http://cmikavac.net/2011/07/09/merging-multiple-nessus-scans-python-script/
[1] https://gist.github.com/mastahyeti/2720173

Thursday, November 28, 2013

Force 'rm' to use Trash instead of removing files completely

This one's great.
Just realized that Linux system, by default, does not move data to Trash/Bin folders. It's the Desktop Environment that does so.
So when you 'rm -rf file', it does not send the files to Trash. If you have deleted some important files by mistake or you want to recover some files which had been accidentally removed using 'rm', you could be in trouble.

Here is what you can do to avoid such situations:
Replace 'rm' with a simple bash script which will move the deleted files to .Trash folder:

Note: Shamelessly copied as is from the forum link in the references below.

1. Backup original 'rm' command.

user@ubuntu:~$ sudo mv /usr/bin/rm /usr/bin/rm.bak


2. Edit /usr/bin/rm in your favorite editor and put this in:

#!/bin/bash

mkdir ~/.Trash &> /dev/null

while [ ! -z "$1" ]; do
    mv "$1" ~/.Trash/
    shift
done


..............Done!!!

Reference(s):
http://www.linuxforums.org/forum/newbie/69673-not-possible-recover-files-deleted-using-rm.html#post364949

Sunday, November 24, 2013

VMware Player missing Virtual Network Manager

This should work with VMware Player 6.0.1.

VMware no longer provides Virtual Network Editor with VMware player from version 5.0 onwards.
And apart from only vmnetcfg.exe, one more file is needed, vmnetcfglib.dll for VMware Player 6.0.1.
Here we go:

  1. Download VMware Workstation X (10 in my case at the time of writing). Do not install.
  2. Extract files from command prompt from the downloaded location:
    C:\Users\user\Downloads\> VMware-workstation-full-10.0.1-1379776.exe /e vmware_extract\
    vmware_extract is the name of directory in which files will be extracted to.
  3. Go to vmware_extract folder, and open core.cab using any extracting software (Winzip, Winrar, 7zip or even Windows default will open it if you double click on it).
  4. Copy vmnetcfg.exe and _vmnetcfglib.dll to VMware Player's installation folder which is "C:\Program Files (x86)\VMware\VMware Player" in my case.
  5. Rename _vmnetcfglib.dll to vmnetcfglib.dll (Remove beginning underscore '_' character).
  6. Open vmnetcfg.exe. :-)


..............Done!!!


Reference(s):
https://communities.vmware.com/message/2305040
http://alexduan.com/2012/10/15/vmware-player-5-0-network-editor/

Saturday, September 14, 2013

Unhide system tray icons on Ubuntu 12.04 Unity

I had couple of applications like Uget downloader, Truecrypt, Data card dialers for Reliance Netconnect, Tata Photon+, etc. which would run in background if you close (click on cross - X) them.

And at times, I needed to bring them to front for different reasons. By default, you do not see any system tray icons in Unity unlike on GNome, Mate or any of other desktop environments.

So here is how do you bring back system tray icons in Unity.

Run


user@ubuntu:~$ gsettings set com.canonical.Unity.Panel systray-whitelist "['all']"
user@ubuntu:~$ 

..............Done!!!

PS: If changes doesn't show up immediately, run

user@ubuntu:~$ unity --replace

Reference : http://askubuntu.com/questions/67312/how-do-i-enable-the-pidgin-system-tray-icon


..............Done!!! 

Friday, March 1, 2013

Install Windows 7 and Ubuntu/Linux Mint on Dell vostro 3460 - having 32GB SSD drive

This was something for which I spent lot of time to make the newly shipped laptop dual boot with Win 7 and Linux Mint (Finally switched from Ubuntu to Linux mint, mainly because of Desktop Environment. I think of conducting a poll of "How many Ubuntu users switched their OS because of Desktop Environment?", or was there any already? Anyway I really got fade up of tweaking and twisting Precise Pangolin having Unity. So its a good feel with Mate on Linux Mint 13).


OK, back to the topic.
New Dell laptops have introduced a new technology called as Intel Rapid Storage Technology for improving protection, performance, etc.: http://www.intel.com/support/chipsets/imsm/sb/CS-020784.htm

They also used Intel Smart Response Technology, Intel Rapid Start Technology, and what not.


My Dell Vostro 3460 has WDC 1TB hard disk and 32GB Samsung SSD drive, with Intel i7 processor and 8GB DDR3 1600MHz RAM, etc.
The 32GB SSD to be used in conjunction with a high-capacity hard disk drive. The combination results in a high-performance, cost-effective storage solution. But only in case of Windows 8. I was quarreling with Dell support guys, what is the point of shipping it with the laptops which can not utilize it. And they say, "Sir, you can upgrade to Windows 8 so to utilize it."




Anyway, here is what I did:

You might not find any drive to install when SATA operation in BIOS is set to Intel RST.


So you would need to go to BIOS and change SATA operation to AHCI.


Then you will see the drives to reformat and install OS.


Disk 0 partitions belong to 32GB SSD drive whereas Disk 1 partitions are present with 1TB WDC hard disk.

There is no possible way to install "System Reserved" - 100MB (Needed for Win 7) in 32GB SSD drive. I tried multiple times to achieve that with no luck. :-(

Also, 32GB space is not enough for C: to install Win 7 onto (with all driver and other installations, etc.). Although its possible. I was installing all rest of the softwares on D: which I had created on 1TB hard disk, but again exception being Graphics driver for Nvidia. As you can not customize the path while installing it.


Finally, after so many alternatives, I thought of installing Linux first, so that I can utilize 32GB SSD drive for '/' partition, as 32GB will be more than enough for '/' partition unlike C: in case of Windows. And installing rest all partitions on 1TB hard disk.
  • Install / partition on 32GB SSD drive
  • 200MB /boot partition on 1TB
  • 200GB C: partition on 1TB
  • Rest all /home partition on 1TB
I didn't think of Swap as I thought I won't be in need because of 8GB RAM.

Once Linux Mint was installed, you would need to install Windows and of course, laptop couldn't recognize any other OS other than Windows because of overwriting of grub, so follow : https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows

Once the Grub repair is done, you can see dual boot screen with Linux Mint and Windows 7. :-)





..............Done!!!


[Linux-Mint 13 - Maya] Disable Nvidia discrete graphic card in a Nvidia optimus laptop

I had been really really screwed up as I was not able to optimize my laptop battery life.
I'm having Windows 7 - Pro and Linux Mint 13 - Maya in dual boot. Yes, I switched to Linux Mint after lot of head-banging with Ubuntu 12.04 with freaky Unity. So this is it. With Linux Mint 13 Mate variant now.

Alright. Now, I had hell lot of problems lined up with DELL Vostro 3460 to customize it my own way.

Battery was lasting for nearly 5 hours with Windows 7 Pro, but that wasn't same with Mint. I had to struggle a lot to find out ways how can I optimize my laptop battery. Mint would last for merely 2 hours. That was really annoying. So many optimization options were not really helping me. Like installing laptop-mode-tools, disabling unused services for every boot-time, and what not.
And even after all that, powertop showed power consumption to be ~ 25 Watts.
Moreover, without ANY application open after just logging into the system. :-(

I was so annoyed that, after thinking of changing distro to ArchLinux, Debian, Fedora, CentOS, I even thought to format laptop and stick to Windows 7 - pro. :-(
I had anyway paid for Windows 7, so why not just focus on it.

Anyway let the rest of story rest in peace. :-)

After lot of head-banging, I figured out that its Nvidia drivers who is culprit behind all this. I saw people saying, "if you had to install Linux on laptop, why go for optimus Laptops."

But this blog post saved me hell lot of battery life:
https://wenlong.wordpress.com/2012/05/01/disable-the-nvidia-discrete-graphic-card-in-a-nvidia-optimus-laptop/

Thank you so much man.
Now, powertop shows merely 10 Watts after logging into system. :-)

I thought of creating a Bash script for lazy bunnies, but then it has a github download link for which version might differ as well. So, that is it!

What do I say to Nvidia when Linus can say that better. :D



..............Done!!!