Security Podcasts

To stay on top of the ever changing security landscape I listen to security focused podcasts during my commute into and out of the office. Not only does this keep my knowledge fresh it also gives me insight into bleeding edge information, events and other information I can share as part of my consulting and training.

Here is a list of podcasts I follow:

Cyberwire: https://thecyberwire.com/podcasts
Security Now: https://twit.tv/shows/security-now
Darknet Diaries: https://darknetdiaries.com/
Risky Biz: https://risky.biz/
Paul’s Security Weekly: https://securityweekly.com
SANS Stormcast: https://isc.sans.edu/podcast.html

Can you recommend any others?

OpenSSL – List Trusted Certificate Authorities

Unlike Microsoft Windows, which provides the Trusted Root Certification Authorities Certificate Store, Redhat and CentOS distributions do not provide a “straight forward” way in which to quickly check if a Certificate Authority is included into the Certificate Authority Bundle (CA Bundle).

During a recent project engagement I came across a simple CLI command which can be used to parse the CA bundle and list all of the CA’s included:

[[email protected] /home/user]# awk -v cmd='openssl x509 -noout -subject' '
    /BEGIN/{close(cmd)};{print | cmd}' < /etc/ssl/certs/ca-bundle.crt

Alternatively the same command can be ran, piped through grep to identify a specific CA, for example “Entrust” –

[[email protected] /home/user]# awk -v cmd='openssl x509 -noout -subject' '
    /BEGIN/{close(cmd)};{print | cmd}' < /etc/ssl/certs/ca-bundle.crt | grep Entrust

Whilst not complicated, this simple syntax saves a substantial amount of time manually searching CA bundles with a text editor.

Angry IP Scanner – Fast Network Scanner

Angry IP scanner is a very easy to use, fast network scanner – basically a cross-platform IP address and port scanner. It can scan IP addresses in any range as well as any their ports, it’s also very lightweight and doesn’t require any installation, it can be freely copied and used anywhere.

 

Angry IP scanner simply pings each IP address to check if it’s alive, then optionally it is resolving its hostname, determines the MAC address, scans ports, etc. The amount of gathered data about each host can be extended with plugins.

How it Works

Angry IP Scanner implements several different methods of detecting alive hosts (pinging).

As a rule, if hosts don’t respond to pings, they are considered dead and therefore not scanned further. This behaviour can be changed in the Preferences dialogue -> Scanning tab. In the same place, you can also select the pinging method:

  • ICMP Echo pinging – This is the same method used by the ping program.
  • ICMP.DLL pinging – This is Windows-only pinging method to compensate for the absence of Raw Sockets.
  • UDP packet pinging – This pinging method is preferred when you don’t have administrative privileges.
  • TCP port probe – This method tries to connect to some TCP port that is unlikely to be filtered (e.g. 80).

Features

  • Very fast (multi-threaded)
  • Scan IP addresses in any range
  • Scan for open ports
  • Cross-platform
  • Portable (doesn’t require installation)
  • Hostname Resolution
  • MAC address capture
  • NetBIOS information gathering
  • Computer Name
  • WorkGroup Name
  • Logged in User
  • Favourite IP ranges
  • Web Server detection
  • Customizable openers
  • Scanning results in:
  • CSV
  • TXT
  • XML
  • IP-Port List

You can download Angry IP Scanner here:

Or read more here.

Getting a Folder Tree Size with PowerShell

PowerShell is a Windows System Admins swiss army knife and there seems to be no limit to the things you can accomplish with it!

It is particularly easy to get the size of a set of folders (e.g. folders within a folder tree) using PowerShell. This is accomplished by getting the total contents size of each directory recursively to an output

Example:

$colItems = Get-ChildItem $startFolder | Where-Object {$_.PSIsContainer -eq $true} | Sort-Object
foreach ($i in $colItems)
{
    $subFolderItems = Get-ChildItem $i.FullName -recurse -force | Where-Object {$_.PSIsContainer -eq $false} | Measure-Object -property Length -sum | Select-Object Sum
    $i.FullName + " -- " + "{0:N2}" -f ($subFolderItems.sum / 1MB) + " MB"
}

Note: This will not include results for any items whic you don’t have read access to.

Ten Handy PowerShell Commands

PowerShell is the command line included with Windows. It is a very handy tool for doing simple tasks without the GUI. In this guide, I’ll show you 10 tips that will improve your Windows Server experience and make your life easier.

Getting a Process

Rather than using the Task Manager or a similar tool, you can use PowerShell to retrieve information about a specific process and kill it, if needed. This will show the process ID (Id ProcessName):

Get-Process ProcessName

Official documentation

Killing a Process

Once you have the process ID of a process, you can kill it:

Stop-Process -id PID

Official documentation

Getting Contents of a File

You can actually get the content of a file (for example a .txt file) and view it in PowerShell:

Get-Content file.txt

Official documentation

Getting Item Information

You can get information about a certain file with the Get-Item command. The cool thing about this is that you can use it to return multiple kinds of data, for example, you can see the last time somebody accessed a file:

$(Get-Item D:\Users\William\Desktop\file.txt).lastaccesstime

Official documentation Continue reading “Ten Handy PowerShell Commands”