Right clicking in the free space of the folder and selecting Properties shows the folder location and the Free Space (as 236.7GB) which is a lot more than the VM's hard drive. Now you can read and write to and from the folder as required.
Rich.
Linux Basics - Files and Folders in the CLI
This post is an accompaniment to my YouTube series video - Files & Directories in the CLI, providing all the commands we looked at. If you're viewing this blog and have not seen the video, then take a look as we go through live demos of all the commands here.
In the last video, we looked at some basic navigation, moving in and out of Directories and listing the contents. In THIS video we’ll be looking at files and folders.
A lot of the
contents in Linux are text files, or to be more accurate, files that contain
text! These can range from simple text files to config files.
We (as
users) need to be able to create, read and modify these type of files and
that’s exactly what we’ll be looking at today.
touch {file name} - create a new file (will also
modify the timestamp of a file if it already exists)
cp = copies a file
mv = moves / renames a file or directory
rm = removes a file (when it’s gone, it’s gone!)
mkdir {directory name} = creates a directory
rmdir
{directory name} = removes an empty directory
rm -rf {directory name} = removes a directory and all the
files within
Spaces in
file / directory names:
Here are two ways to deal with spaces in file names on the CLI:
“file name.txt” or “directory name” = surround the whole file name (and path if using) with double or single quotes to tell the system to use all the characters as a string.
file\ name.txt or directory\ name = put a back slash (\) before the space to "escape" the space and treat it as a character in the string.
Finding files:
find . -name ‘file*.txt’ = searches in the current directory
and sub directories for a file with a name starting with “file” and the
extension of .txt - case sensitive.
find . -iname ‘file*.txt’ = searches in the current directory and sub directories for a file with a name starting with “file” and the extension of .txt - case insensitive.
In the next Blog and Video, we'll be looking at reading files in the CLI via a few methods. Be sure not to miss it!
Thanks for reading.
Rich.
Linux Basics - Introduction to the Linux Command Line
This post is an accompaniment to my YouTube series video - Intro to Linux CLI providing all the commands we looked at. If you're viewing this blog and have not seen the video, then take a look as we go through live demos of all the commands here.
The command line is the most powerful place in Linux and Windows. In Linux we use the Terminal to access the CLI.
The Linux CLI is case sensitive so attention to detail when entering commands is vital!
You use the CLI by providing commands and arguments - every action in a GUI is actually a bunch of commands and arguments in the background.
In the CLI:
$ prompt = standard user
“#” prompt = root/super user
Sudo - What is it and what does it mean. Sudo is the Linux equivalent of the Windows Administrator. It stands for Super User DO. It elevates the privileges of your standard account to administrator level (Super User) to perform certain tasks.
whoami = shows the current user
hostname = shows the name of the host machine
pwd = shows the current working directory - essential for knowing where in the file system you are
To update your system:
sudo apt update && sudo apt upgrade -y - "sudo" is us asking the system to elevate our privileges to carry out the following command. "apt" is the command that we will carry out, which is the package manager for the likes of Kali and Ubuntu. "update" is the argument, what we want the command to do (to update the repositories). The double 'and' sign "&&" is chaining two commands together. Next we elevate our privileges again, run the "apt" command but this time pass the "upgrade" argument to tell the system to install the updates. Finally, we pass this command another argument of "-y" to tell the system to not prompt us before installing.
This can take anywhere from a few seconds to 15 minutes, depending on how recently the system was last upgraded!
clear or <ctrl>l = clear the screen
<ctrl>c = will break the running command
<ctrl><shift>c = copy
<ctrl><shift>v = paste
<ctrl>left arrow = move to the start of word to the left of the cursor
<ctrl>right arrow = move to the end of the word to the right of the cursor
arrow up = scroll up through command history
arrow down = scroll down through command history
history = shows all command history
!n = use the line n in the command history list (after showing the history list)
history -c = clear the command history
When starting out, use the GUI to help find your way around!
ls = shows a list of the files and directories contained in the current directory (contents of the current working directory)
ls -lah = is useful as it shows the long format, all files and folders (even hidden ones) and human-readable.
cd .. = (change directory) navigates backwards one directory - the prompt will change to reflect the new working directory
cd ../.. = will go back 2 directories
cd {directory name} = navigates into the specified directory - the prompt will change to reflect the new working directory
man {command} = shows the manual page for the specified command - useful when you need to know what the command does and the arguments it supports etc. Press q to exit the manual page.
{command} --help = (command then 2 dashes then help) will show brief info about the command and it’s usage options.
https://explainshell.com/ = for more help on commands.
In the next Blog and Video, we'll be looking at Files and Directories on the Command Line.
Thanks for reading.
Rich.
One of the easiest way to get hacked, and it’s still one of
the most popular methods is through weak and/or re-used passwords. You’ve probably
heard this all before so I’m not going to rant on and on till you wander off
and bury your head in the sand, I’m just going to tell you that you need to
sort it! …… and show you how!
These are in no particular order, rank or favouritism. In fact, I’ll do them in alphabetical order to avoid any conflict:
It looks like Microsoft has improved it’s password manager offering with the Wallet which includes a Health Check for your passwords. It can keep track of your Payment info, Passwords and personal info. Edge can also suggest passwords for you.
The downside are: The Authenticator function for MFA is a separate standalone app. To have the password manager on all devices, you will need to install Edge Browser on them all and use that to surf the web using your stored passwords (all except on Chrome Books which don't support Edge). It’s good but not very efficient for me. TechRadar have a good write up on it here.
The blog has been a little quite recently as I've been focusing on some training and the creation of my new YouYube channel - https://www.youtube.com/@richinthecloud/. People ingest information in different ways, some prefer reading so the blog is an excellent choice. However, some prefer a more visual style - watching video's, so the YouTube channel seemed a perfectly natural opportunity to reach the more visually inclined.
The channel is also a great way for me to really get my point across and get into the nitty gritty of subjects which would otherwise result in a short novel. The channel will mirror the blog content but dive deeper into details with near real time walkthroughs and additional thoughts. What I'm creating is raw, down to earth and shot with one take, so there's no post editing - you get to see all the mistakes that I can make and any errors/pitfalls that can pop up along the way. Hopefully this provides a more real world experience for the people curious about IT and Cyber along with those looking to start learning or break into the field of Cyber Security.
Watch the welcome video here and whilst you're there, why not subscribe so you're kept up to date with the latest releases and content. I'd love to have you along to keep me company!
Thanks for reading,
Rich.
If you've just installed Nessus Essentials and are now sat wondering what next, to give you a quick idea, we'll do a first scan to show you how it works. If you've not yet installed Nessus but want to, check out my last post on "Installing Nessus Essentials on Kali Linux". Lets get scanning...
Following on from where we left off or from opening Nessus, if you're not on the screen below, click "My Scans" from the left hand menu and then "New Scan" on the top right of the page to bring you to our stating point:
Click the "Basic Network Scan" button. In the Name field, you can give the scan a name to identify it (useful if you configure a scan that you want to run again in the future), I'll call mine Test, you can give it a description where you can details the reason for the scan or the configuration used but I'm leaving mine blank. The Targets field is where you need to put your IP addresses for the scan, I'm just going to use the loopback address to scan the local machine (you could also create a file of IP addresses and upload that to save typing them all in). I'm not going to go through the rest of the options as they're not required for a quick scan but you can explore them at your own leisure.
Click Save. Now you have a Scan saved to My Scans that you can find, run and rerun as required.
To kick off the scan, click the little Play icon (or the launch button as it's called) to the right (the X will delete the saved scan!) and you'll see the Update icon, the Play button turns to a Pause button and the last scanned field gets updated. Sit back and wait for the scan to complete.
Nessus is a powerful attack surface vulnerability scanner from Tenable. Download Tenable Nessus Vulnerability Assessment | Tenable®.
I've seen a few walkthroughs for Nessus Essentials and this is another one, but when I came to install it, I found that with the updates to Nessus, a lot of the screen shots were out of date so I thought I'd do a more recent walkthrough. I'm installing Nessus on a Kali Linux VM running in VMWare Workstation 17 Player (I'll do another write up for that install). I've now created a YouTube walkthrough which you can follow along with and see the install in a live demo here.
Open Firefox and browse to https://www.tenable.com/downloads/nessus - to download Nessus.
Select Version and OS platform (normally picked up be default) and click the Download button:
Accept the Licence Agreement to (feel free to read it all at your leisure):
Once downloaded, open a terminal, sudo su to switch to root (if not already), cd into Downloads folder cd Downloads/ and start typing the following command dpkg -i nessus then hit Tab to auto complete the file path (if it doesn’t auto complete, replace nessus with the full file name) and hit enter:
Once installed run /bin/systemctl start nessusd.service to start the Nessus service:
Then go back to Firefox and browse to https://kali:8834 - You will need to click “Advanced…”, scroll down and then click “Accept the Risk and Continue” as Nessus is using a self signed Certificate that cannot be verified (which is ok as it’s an internal system) to reach the Welcome page:
Click the Continue button and then select “Register for Nessus Essentials” and continue:
You will need to enter your details, this will provide a one time activation code (which cannot be used again so I’ve found that some non genuine details will work fine for me here as I already have a working version in my home lab which I registered with my real details. This install will be torn down with the lab I've created just for a specific course), then click Register:
Then click continue on the next screen:
Create a user name and password - this will be for you to log into Nessus so make sure you write down or remember these details! Then hit “Submit”:
Nessus will then download it’s required plugins, this could take a few minutes:
After a short wait, Nessus will open and start compiling the plugins:
Wait for the plugins to compile, indicated by this spinning update icon. This bit will take many minutes, now’s the time to grab a fresh brew, some lunch, walk the dog … you get the idea. Once it’s gone you’re good to go:
You’re taken to the My Scans page by default where you can explore or run your first scan:
Click the New Scan button in the top right of the screen and you'll be taken to the Scan Templates page. Here you'll see the extent of what Nessus can deliver. As this is the free version of Nessus, some of the templates won't be available, requiring a paid licence to run. In this free version we can scan up to 16 private IP addresses in one go.
For the installation stage, we're now done - congratulations you now have a functioning vulnerability scanner for your lab, home network or small business.
I hope you've enjoyed this walkthrough of Installing Nessus Essentials on Kali Linux, in the next post I'll do a quick walkthrough of "Running your first Nessus Scan". I've not added it here as this post is long enough as it is!
Thanks for reading.
Rich.
"Vulnerability management is an IT security process that aims to find vulnerabilities in the IT infrastructure, classify their severity and, in addition, provide a list of actions to be taken to address the vulnerabilities. The goal is to eliminate vulnerabilities so that they can no longer pose a risk." - taken from the greenbone.net website.
In an effort to play with as many tools as I can I decided
to install Greenbone Vulnerability Scanner. It’s a tool that has featured in
some of the online training platforms I’ve used like Try Hack Me so it was a
good choice to try. I’ve already got a Nessus Essentials scanner but seeing how many
different tools work can be useful to see which I prefer and which works best
for me. This is a bit of a long one so go grab a brew now then strap in….
I kicked off the research by watching a couple of YouTube video’s and installation looked pretty simple so I went ahead and installed a fresh Kali Purple VM on my ProxMox machine. Probably not the best choice of OS as I found out after a few issues but it was the OS used in the videos and it seemed to work for the presenters. GVM is the package used to install the scanner, manager, portal and all the dependencies required to make it work.
My first attempt failed miserably. I installed Kali and updated it, installed GVM and ran the setup script. After running the “check-setup” script
to make sure everything had gone to plan I tried to connect to the Web Portal
from a different computer to find that it wasn’t reachable. So, I went back to
the Kali VM and launched Firefox to connect to the portal on the loopback
address … but that didn’t work either. I had the right address each time and
the port number but nothing would connect. Then, I realised a major mistake I’d
made … I didn’t take a snapshot of the VM after installing and updating Kali. I
was so rushed to get the tool installed and get playing with it I carried out a
cardinal sin! Nothing I tried would resolve the issue and after turning to
Google for a bit of research I discovered that Kali is NOT a supported OS to
run GVM on and people who’d had the same issue as me didn’t seem to get any other
answers than “install it on a supported OS”. Well, I’d seen it work on Kali so
being as it’s a VM I hit the big delete button and started again.
This time I installed Kali, ran the updates and then took a snapshot, I wasn’t going to waste all that time again! After that, I installed GVM and then went and watched some TV whilst the setup ran. Coming back to the VM I had my login password and was feeling hopeful. I ran the check set up script and all looked good. This time, I fired up Firefox, punched in the Loopback address and port and … Hey Presto! I’m in!
I’d seen some other issues that people had had with GVM so I tried to execute a quick scan and encountered the same as a lot of the others … a “Failed to find config” error. Luckily, there was a YouTube video to help. The fix suggested was to run the feed update scripts to update the feeds and scan configs then everything magically works. NO it doesn’t – well not for me anyway. Back to Google where I found a forum where this very issues was being discussed (and the obligatory “Kali isn’t a supported OS” message was repeated many times. The fix offered was to run individual feed update scripts (instead of the default bulk one that I had done) and then I read the important bit at the bottom … “WAIT!”. Turns out that updating the feeds pulls down the updates, then GVM needs to import them for things to work properly (which it does as part of the script but in the background). You need to check the ‘Administration/Feed Status’ page and wait for all the entries to turn to current. So, I ran the scripts one by one and watched some more TV. On my return I checked the terminal to make sure all was complete and noticed that this time, the scripts seemed to had pulled down incremental files, which may have been what was needed to complete the update. I checked the Scan Configs and BOOM! There they were, all the Feed updates showed as ‘Current’.
I was so excited to go run my first scan, I almost forgot ….. SNAPSHOT! Snapshot taken and my very first Greenbone scan was under way. The good news … “0’s” across the board 😊.
I’m planning to move this ProxMox machine to my IOT network
so I can scan all of the lovely speakers and camera’s etc I have to see just
how secure they are, and if I spot a few older ones with some nice
vulnerabilities … well, they may get replaced with new ones and then the old ones used
as targets!
I wouldn’t say that this was a quick project, although it
was all done in a day I was hoping for more like a couple of hours but there
again, I did come across issues. So, here’s basically the steps needed to
install, setup and update the Greenbone Vulnerability Scanner:
Install / use a Linux VM as the base OS – Greenbone suggested on their forum post from May 2022 that “Debian 11 should be fine” but I can confirm that this works on Kali! (Missing scan configuration - Archive / Greenbone Community Edition - Greenbone Community Forum)
o Run sudo runuser -u _gvm -- greenbone-nvt-sync and wait for it to complete
o Run sudo runuser -u _gvm -- greenbone-feed-sync --type SCAP and wait for it to
complete
o Run sudo runuser -u _gvm -- greenbone-feed-sync --type CERT and wait for it to complete
o Run sudo runuser -u _gvm -- greenbone-feed-sync --type GVMD_DATA and wait for it to
complete
o Now
go to the Feed Updates page on the portal and wait for them all to complete ...
maybe time for another brew! Possibly some biscuits? Well, you do have the
time!
o Once
they’re all complete try a quick scan. If it still doesn't work after
this, my only advice is to leave it running and try again later. After that,
revert to an earlier snapshot before you installed GVM and start it again … wait
… you did take a snapshot right?
Thanks for reading,
Rich.
Vulnerability Management | Open Source and GDPR-compliant - Greenbone
Kali Linux 2023.1 Release (Kali Purple & Python Changes) | Kali Linux Blog
Having a Home Lab is great ... at home, but what if you want to access it whilst you're out and about? This was my problem so I set about a bit of research. After comparing a couple of offerings I chose WireGuard VPN as it seemed fast, secure and reliable. Best of all it is free and reasonably simple to set up.
curl -L https://install.pivpn.io | bash During the install I did need to go out and set up a Dynamic DNS service through a popular web vendor as my ISP uses dynamic IP addresses, meaning that once I'd set up the VPN and the IP changed, I would not be able to access it again until I reconfigured the config files. Not very useful if you're not at home and can't check your public IP. I checked the setting to enable unattended updates so that I didn't need to keep logging into the Pi to manually update and patch it every week.
I set up a Test user to trial the VPN, installed the Wireguard client on my phone, generated the QR code from the server on the Pi, scanned it via the client, switched it on and ..... NOTHING.
On May 9th 2023 I successfully passed the CompTIA Security+ CE exam. Here I'd like to share my thoughts and experiences with studying towards and taking the exam.
Passing the Network+ was the first step towards a career in Cyber for me. I believe that you need to have a foundational knowledge of networking and how everything communicates before you can think about how to secure it all. You can read about my experiences with the Network+ here.
The Security+ cert is a lot more important to me so I wanted to not just be able to pass the exam but to really understand the fundamentals. To do this I used similar resources to study for the exam as I did with the Network+ but then took it further. So here's what I used:
On January 30th 2023 I successfully passed the CompTIA Network+ CE exam. Here I'd like to share my thoughts and experiences with studying towards and taking the exam.
I used a number of methods to study, along with using my existing knowledge from previously being a Helpdesk Analyst and from setting up my home networks and labs. Other methods I used are: