Paul Sutton

CyberSecurity

CyberSecurity part 5

So on to video 3 of 8, I will maintain the login link so that you don't need to go hunting back through previous posts.

console1

Discuss

Summary

Video starts off correcting an error from the first video, presenter forgot to cover the copy (cp) command, this is discussed at the start of the video.

Example 1 – make a backup of a file

cp file1.txt file2.bak.txt

Example 2 – Copy a file to home directory

Lets say we are in /home/user/junk (like in the video):-

cp file1.txt ~/ will copy to home directory. You can use cd,, to drop down a level in the file system to /home/user to confirm this.

Also use wildcards e.g

cp *.txt will copy any files with .txt as the extension.

User permissions

chmod – change mod using sudo on its own has a time out sudo -s assumes the root user to root until you type exit

root user has a # normal users have $

changing owner permissions

chown – change owner

chown user:group file.txt

You need to be root for this so use sudo chown user:group file.txt

Tags

#CyberSecurity,#BASHShell

CyberSecurity part 4

So on to video 2 of 8, I will maintain the login link so that you don't need to go hunting back through previous posts.

console1

Summary

So this episode looks at how we can view the content of text files, which are used for pretty much everything on GNU / Linux system.

On a very basic level, the echo command will send the contents of a file to the screen

echo file.txt

cat – which is short for conCATenate is good for looking at short files, however sometimes we have files that are longer than the screen can display so we can use the less command

cat filename less filename

The less command stops displaying contents and then allows us to view more lines by pressing enter on the keyboard, press q to quit this program.

You can also apply this to more than one file

cat file1.txt file2.txt

we can also pipe output of cat in to less e.g

cat /etc/fstab | less to get the same effect

Sometimes we need to add a single line to the end of a file (append) we can add another like to the end of file.txt with:-

echo “new text” >> file.txt

You can also append the contents on one file to the end of another

cat file1.txt >> file2.txt

To edit a file in more depth, we need to use an editor such as nano

So nano /etc/fstab will open the file as read only,* this is because files such as /etc/fstab re read only to normal users, in order to edit, you need to elevate your privileges using sudo.

sudo nano /etc/fstab

You will need to enter your password to proceed at this point, of course your user needs to be part of the sudoers list in order to do this, otherwise you get reported to your sysadmin. Ubuntu based distributions use sudo to elevate permissions by default, Debian using root / user set up so you have to use su unless you set your system user up to use sudo.

Discuss

Tags

#CyberSecurity,#BASHShell

CyberSecurity part 3

You should now be set up with an account, so go ahead and login via the home page

console1

Once logged in you will see the above screen

So as mentioned, I will be sharing a series of 8 videos that cover different topics on using the command line shell (BASH).

Note: Not all the commands covered in this BASH series will work, partly as it seems some are not included in the vfsync system.

Note 2 Also worth saying that vfsync using the sh shell and not the bash shell. This is more of a workaround, to provide shell access.

If you are concerned about privacy, I have included the invidious link below too.

Commands

So some of the commands covered in this video include:- * cal – calendar * man – man pages * clear – clear screen * pwd – print / present working directory * ls – list storage * ls -a show hdd * files prefixed with a period . are hidden * ls -a -l (-l is long format, more information) * cd – change directory cd no argument – back to home * e,g cd Music * mkdir – make directory (mkdir junk) * absolute and relative paths * absolute – path from root of file system /home/user/junk * relative – path from where you are now e.g cd Music * pushd and popd – go back and forth between folders (see video for details ) so pushd /home/user/music/pop from /home/user switches to the pop directory, using popd goes back to where you were before e.g /home/user * touch filename * touch file2 file3 * touch file1 (existing file) will update the date / time stamps * rm filename – deletes a file * mv filename newfilename – * can also move a file : mv file1 /home/user/junk/files/ * rmdir – remove directory * rm -r – recursive

Shell -

  • $ = indicates your normal user is logged in
  • # = denotes root (admin)

Linux directory structure

directories and folders (interchangeable)

dir struc Cite https://www.linuxyogi.com/

explanation of /etc /dev /home /usr /var folders and their related subfolder.

/usr – universal system resources

Discuss

Tags

#CyberSecurity,#BASHShell,#BASH,#bash,#Bash

CyberSecurity part 2 Supplemental

As this series is designed to run over the next few weeks, with a post each day. The following provides a list as to all the posts that are coming up.

CyberSecurity part 3 – BASH Basics 1 CyberSecurity part 4 – BASH Basics 2 CyberSecurity part 5 – BASH Basics 3 CyberSecurity part 6 – BASH Basics 4 CyberSecurity part 7 – BASH Basics 5 CyberSecurity part 8 – BASH Basics 6 CyberSecurity part 9 – BASH Basics 7 CyberSecurity part 10 – BASH Basics 8 CyberSecurity part 10-1 CyberSecurity part 11 – Nano Editor CyberSecurity part 12 – Shell Scripting CyberSecurity part 13 – Sed,Grep & Cron CyberSecurity part 14 – System D Bsics CyberSecurity part 15 – Networking Basics CyberSecurity part 16– Day off- A few useful links CyberSecurity part 17 – OpenSSh CyberSecurity part 18 – Git & Github CyberSecurity part 19 – Virtual Machines CyberSecurity part 20 – Computer Misuse Act CyberSecurity part 21 – Python Intro CyberSecurity part 22 – Pen testing tools CyberSecurity part 23 – CyberSecurity Courses CyberSecurity part 24 – Functional Programming in Coq CyberSecurity-part-25 – Open Source vs Free Software CyberSecurity-part-26 – Self hosting

Tags

#CyberSecurity,#PostIndex

CyberSecurity part 2

As mentioned in the previous post. I am going to start by presenting an introduction to the Linux command line (Terminal).

console1

So as this screen says, you can create an account. If you go ahead and do this here

Note: Once account is created, give the system time to set everything up (otherwise you get an error about unauthorised user) you can login to this via the website using the login button.

Please note: As there are a huge number of videos on this, already on platforms such as Youtube. I intend to use these as a basis for this series. However I would like to be able to expand further, as we go providing a summary of what is covered etc.

Discuss

Part 3 will be on May 4th.

Tags

#CyberSecurity,#BASHShell

CyberSecurity part 1

Several people at Code Club / STEM Group have expressed an interest in learning about cybersecurity and ethical hacking.

As this is a huge subject area, I am going to start off with a series of posts to take this back to basics, starting off with learning about the Linux terminal and associated commands using the BASH shell.

Firstly, we need access to a Linux system, there are numerous options here, however this include using a Raspberry Pi or Beagle Bone Black, Installing a GNU / Linux operating system on your computer at home or using a virtual machine.

Another alternative would be to use a browser based emulator, such as:-

For the purpose of what I want to present here, I will be using the Alpine Linux option, (console). This could be the best short term solution, I will be making a post on virtualisation.

Important note going forward, is that the GNU / Linux console / terminal is case sensitive.

Discussion

As code club runs on the First and Third Saturday of the month, with the STEM group running on the Second Saturday, it makes sense to be able to ask questions in the meantime. To this end, I am going to suggest that we make use of the forum set up to support self directed learning. Of course this is open to other learners too.

This is free to use, as it is my own forum, the most important thing, is that it is hosted within the GDPR jurisdiction, so data is safe.

The next post in this series, will look at the JS Linux option a little further, if you DO have access to a Linux box, then great.

Tags

#CyberSecurity,#BASHShell

Cybersecurity course

Just completed Cyber security with elearningAtWork

This short course will explain why cyber attacks and data breaches happen and provide practical advice on how to set up effective defences.

This online Cyber Security awareness course covers the following key areas:

  • Why cyber attacks and data breaches happen
  • Potential ‘cyber threat actors’ and the main motivations behind cyber attacks
  • How to recognise and deal effectively with phishing attempts
  • The importance of keeping passwords secure
  • Security for smartphones, laptops, tablets and desktop computers
  • How to report a suspected cyber attack, and what to do if you genuinely make a mistake
  • The importance of cooperation and why working closely together helps overcome a wide range of cybersecurity issues.

Cyber Secutity

#Training,#CPD,#CyberSecurity