Hello and welcome back to the official start cop series we're onto.
And figuring Callie Lennox and we're going to be covering some Kelly Lennox essentials in this module.
So we've got some Khalilah Central topics and also some other important concepts to help you manage
your Daily Limits installation more effectively.
So this is our table of contents.
We're going to talk about the network manager, how to configure interfaces.
We'll talk about the system, the network daemon.
We'll look at managing users and groups, creating new accounts, modifying or disabling accounts.
And we'll also look at configuring specific services for programs like databases, Apache Web servers,
PostgreSQL minus Kuo.
We'll look at SSA for remote logins.
As well.
So this is our chapter flow.
So we'll talk about the network first.
We'll move into managing users and groups, configuring services, and then managing the services.
So we're going to talk about the typical desktop installation of Kelly Linux.
You usually have the network manager program already installed and it can be configured and controlled
through an arms control center and also through the top right menu.
You will go ahead and log in.
With our default username and password.
I built this from the Kelly Linux virtual appliance.
So it's the latest version.
And you'll notice in the top right hand corner, you have this little network icon.
Right now it says Ethernet network connection or wired connection one active.
So you also see other things like VPN connections and you can disconnect, reconnect, you can right
click on it and you can edit different connections.
You can add new connections, both wireless VPN connections, IP SAC Layer two, tunneling protocol,
anything you might need, even Bluetooth connections.
So we're not going to do that right now.
When I close this out.
You can also get to the same resource from the settings menu.
Instead of calling.
There's all your different system options are here.
We can go into the settings manager and control different things that you might want to see, different
tweaks that you might want to make.
Keep in mind from before the previous models.
If you want to get out of your virtual environment, you can click the right control or you can press
the right control key on your keyboard.
You can actually modify that inside of VirtualBox if needed, if you're running it virtually.
So the default in our configuration will typically rely on the HDP, the dynamic host config protocol
network manager gets preinstalled and configured through Vietnam during default desktop installation,
but configuring it by default depends on the DHCP server to get to the DNS domain name, server, gateway
and IP address.
So there's other kinds of add ons that can be managed through a network manager.
You can create multiple profiles.
Even so, you can easily switch between different networks.
As far as wireless networks go, they are automatically tied to their service set identifier or SS ID.
And if you're working with a virtual machine or virtual box, it may not recognize your system onboard
wireless network interface card.
It must be aware of that.
You may have to use an external network adapter, which we may reference in another video.
The network manager provides integration with many types of VPNs like SSA, Open VPN, Cisco's VPN as
well.
Now let's look at some of the different things you can do with checking to see what your local network
IP is.
If you go back, we go back into our virtual environment, our colleague Linux distro.
Then we open up a terminal.
We can go ahead and use the command line from here.
And notice we're at the county at caller interface and there's a dollar sign because it's a regular
user account, not as a route.
So we can do I have config.
And notice that it's in this particular desktop environment.
It's not there by default, depending on which desktop you install.
You may have to change your setup to get all the same commands.
So in our case, it's not that it was not there.
It's not as we have the pseudo due route.
An exit back out to a regular use urban use cleared a clearance rate with Cally.
We're going to pseudo as you and we've already typed in the password so we got a different prompter
notice.
We have the town signs and now we are as root and I have config command works as per usual.
And here we can see some different things like our local IP version for address.
As well as our IP address, we can see different how many received and transmitted packets in frames
that were sent.
There's also this l0 this is the loopback address.
This is essentially the same thing as pinging your network card.
This is the in windows.
This would be called the local host or the local loopback.
Notice you can also check your local Mac address with I have config and there are basically three different
ways to configure networking in Linux.
You can use the graphical interface, you can use the interface up or down commands.
And the system commands.
So first of all, look at the graphical interface.
Switch back over to Kelly.
We can click on this button here and we can click Disconnect and we can see now we're disconnected from
the network and we have a wired connection.
And we'll go ahead and reconnect.
And one of the things that you can do if you've typed a command before, you can press the up arrow
and you will get back the last typed command.
And in this case, I have config.
And we've got our IP address, our network mask, and our broadcast broadcast is essentially the address
you would communicate to on this network if you wanted to send traffic to everyone.
If we want to go ahead and go into the interface file.
We can go into the.
The ETSI network interfaces file.
So this is essentially all the interfaces that the system knows about initially.
So it has the.
Pulls the information from the interfaces data file.
If we wanted to add additional interfaces to start at any time, we could do that.
And you can also do it from the command line as well.
And these are this is actually the main page or the manual page for the interfaces command.
So if you wanted to set up different network interfaces with DHP versus Automatic, you could set up
static IP addresses.
If you see a pound sign and this file, essentially that means that it's an end of line.
Comments.
Or I should say it's just a comment and the one comments are not supported.
So the comment has to be on its own line.
And so it gives you some more amplified information if you want to learn in more detail what your different
options are.
And there are some also some different scripts that are in this folder as well, which are beyond the
scope of this course.
You could change things like the empty use size or the maximum transmission unit, how much data you
want to pass over each packet.
You can change the time to live.
You can change lots of different things.
You can set up tunnels with this command structure.
This is the System D file, which is essentially the service and service manager for Linux.
So whenever a it runs as the first process en route, so it essentially brings up all the other services.
Anything else from other users get started separately?
It's not normally invoked directly by the user, but it is started at boot time.
You probably more likely interact with these the services that are managed by system this.
System B also has some limitations as far as a lack of integrated support for wireless networks.
So you may have to rely on other configurations for wireless support.
Now let's talk about managing users and groups.
So though Kelly is most often run while authenticated as a root user, you may often need to create
non-covered accounts for various reasons.
Especially if you're using Callie as a primary operating system.
Additionally, the newer versions of calling have removed the root account and they've added any user
accounts you can't sudo to root.
That account is kiwi for the username and kiwi for the password.
So Kelly Linux stores the list of users in the Etsy password file.
That's Swg, which is a list of users.
It stores the encrypted password of those users and the Etsy shadow file.
So let's go ahead and take a look at what that means.
We're going to use the cat command.
And there is the Cali user and its corresponding hash password that is the other accounts might be system
accounts or for certain services that do not have passwords.
If we want to be able to add an account, we have to use the ADD user command.
So the ad user command takes a pretty straightforward list of command.
So let's go ahead and add a user briefly.
Once they add user user one, and then it's going to add the group and it's going to add that user one
into that user one group.
It's also going to create a home directory and copy some files over to the Etsy scale directory.
Now let's go ahead and give it a password.
Her strong passwords will be for another another day.
You can type in some other information here.
Like their name, room number.
You can put their work phone in.
But their home plan.
And then any other information.
You want them to have, you know, say yes to confirm the information is correct.
And now let's go ahead and clear the strangest.
So we clean up our workspace here.
Let's go and cat out the Etsy password file, which shows the list of users.
Notice we have our newly created user account here.
If user one John, his name is phone number and there's this shell and we still have the caller ID account
which comes with our built in cally links.
Let's go ahead and cashed out of the Etsy shadow file again and we'll see that we now have the user
one account and its hash password.
Now, for those that have not taken cybersecurity course for hashed, passwords are essentially how
passwords are stored.
It's just taking the plaintext of what I'm typing in when I'm creating the user account and I'm running
it through a mathematical function, a one way function.
The idea is that it's hard to undo this hash version of the password.
It's not easily digestible or easy to break.
The what they call the ciphertext version.
So this is essentially just a scrambled version of the plaintext, and it's been run through something
like MD5 or SHA wan, which we maybe shot.
We learned about SHA256 when we were doing file integrity.
Depending on the security of the system, it may hash the password more securely.
So a longer hash is the more number of bits that you output, the more secure it is.
So essentially a hash password is no matter what you put in as the plaintext, it's depending on the
algorithm.
It's always going to have the same amount of hash value, same amount of characters.
It's so.
We have, we talked about the wizard to be able to add users.
We looked at the hash passwords and it's fairly straightforward.
And let's.
Also look at the Etsy group folder.
And go and clear the screen.
And then it's these are all the different groups that are some of these come by default.
There's the Carlyle Group.
There's the user group that was created when I created the account.
You can actually add groups manually yourself as well.
Let's go ahead and look at the.
The Group Shadow file, which is essentially the.
Password for any of the groups.
We don't have any because you see this exclamation point, that means there's no password set for that
particular group.
So if you wanted to set a password, you could do that.
So now let's look at managing different users and groups so we can modify existing accounts with several
different commands.
If you're logged in as a regular user, you can change your password, which will in turn update the
Etsy shadow file.
So let's go ahead and look at this real quick.
Let's look at the shadow file from the perspective of our user one accounts and notice that the hash
ends in a1ab you want.
So let's, let's keep track of that VI.
And what we're going to do is we're going to go ahead and password.
We're going to change the password.
That user to something else.
And when we do that, it should also change.
That hashtag, you know, we got the prompter.
The password was updated successfully.
Let's go ahead and cat out the shadow file of the new password.
And then as we got a different value this time.
So you're always going to in the case of the.
You want to make sure that your password is long enough so that it is not easily accessible, but also
that it's long enough that there's less chance of there being another user that uses the same password.
Sometimes users may use the same password, and that's just going to happen because the natural order
of things.
So that's how an individual user changes their password.
What if you want to change the full name of something, for example, or the finger information?
So there's the finger command, which is the data that's stored in the ETSI password file.
So.
If we wanted to.
Finger a particular user.
And it would return back that user's information.
Only the root can run this CHF and command or change full name or real username and information.
So this could be the full name, the office number, the route, the phone number, all the stuff that
we put in with the default account or when we created the account and.
Essentially the default configuration is to keep users from changing their name.
Of course, Root can do it.
And there's different flags with CHF.
And so if you wanted to change.
The full name.
You could change the room number.
Maybe you just want to change the work number.
And of course, there's always if you forget how to use a command, there's.
Usually you can type dash help.
Now some commands won't have the dash help.
In this case, we have the dash.
Oh, it's a little bit of a shorter abbreviation of the command van.
Using the main page or the manual page.
So let's go ahead and change the name of either one.
Now let's say let's maybe we want to change the the room.
Now let's go ahead and look at the change age command or the C h age command, depending on how you
want to pronounce it.
So.
The Change Age Command allows the administrator to change the password expiration settings, bypassing
the username as an argument.
So we'll look at the main page.
So you give it the options and the long end.
You can actually say what the last day.
More of their password was changed.
You could set an expiration date.
You can set a certain number of days before it's locked.
So there's the information on user one.
It doesn't expire.
It's inactive.
Never.
And the maximum and minimum number of days.
So if you wanted to change the age of the password, you could set a minimum password.
Age.
And we could set a maximum pass range we could set it to.
The last password change and we have password expiration warning, we'll leave it the defaults and when
it goes inactive and we can just view the information now and see that all of our changes were just
made.
So you can do that with any accounts.
You can also.
Require a users account to expire, for example.
So the system administrator, you might have to enforce password changing policies for a period of time.
So no other unauthorized users can view this information.
Only the root user or somebody that can sudo to root.
So let's go ahead and do a password
dashi and then we'll put in the user account user one and we've just now set that account to expire.
So when that user tries to log in the next time, they should have to enter a new password.
Those are useful tools for managing individual user accounts.
Now let's look at managing users and groups.
So maybe you might want to disable or enable a user's accounts.
From a system administrator perspective, you might want to lock an account for somebody that's temporarily
leaving or maybe somebody is moving to a new project and they don't need that particular account anymore.
Because you don't want them to build a modified delete or add files.
There's also so the dash you flag under the password command allows you to unlock.
So you lock it with the dash l command and unlock it with the dash you use.
Let's go back to our virtual environment.
Let's go ahead and password.
Dash l user one.
And we've now walked out of.
Let's do password.
You use your alarm.
And so.
From time to time.
Let's go ahead and add another user account just because we can add user to
password here.
Give it some information
and that's it.
Yes, the information is correct.
So let's go ahead.
And do you want to lock that nucleus created?
And there we go.
So that user tries to log in.
So we can still switch on the active session, but that won't take effect until the next time that they
log in.
So these are important things to know when you're managing users.
Now, what about groups?
Let's talk about managing groups so each user could be a member of many different groups.
You might have a group for one particular department or another.
And you have the need to switch around users amongst different departments as necessary so you can change
the.
User ID command or the user ID variable and also the group ID variable.
Let's go ahead and look at a user and see what the ID command does for us.
So we have, first of all, look at the main page.
So this will print out the real and effective user and group IDs.
So let's do ID user one.
We can see that it's 1001 as the user ID or UID variable.
It's 1001 for the group ID.
And the groups that it's a member of.
Now, let's say maybe we want to add a group.
To the system.
So let's use the ad group.
First of all, look at the man page
on some like Cicero's group, ad or ad group in this case, ad group or ad user.
They're all part of the same command family.
So we can.
Modify these commands inside of the add user dot config final.
But essentially if you don't give it any other options, it'll just set up each user group as a default.
So let's go ahead and do
so.
We've added a new user group and notice it created a new group ID
and we can use the.
So let's say maybe we want to delete that group.
So we use the little group user group command, and now that group is gone.
So this is we can also look at if you put the ID command and don't put any parameters after it.
In addition, return the ID for the user that it's actually logged in as.
So notice that now user one is required to change the password.
So we're going to change it to
something else.
First we have to enter our most current password and then we're going to change it to a new one.
So it must use a longer password to note that it does require password complexity requirements.
So we're going to do
notes that accepted the password.
We can cat out the ETSI password, e-verify or I'm sorry, the etsi shadow.
There's the etsi password file.
You can see the new user that was created.
Let's go in cat off the shadow file.
Notice we can't cat it out because we're not.
Root So we're going to have this pseudo.
The root,
and that is that user one is not in that file.
So we'll come to that back to that in a minute.
Let's go and switch back over to Root.
But we have to do it with the Callaway command or the Callaway user because that users in the zero file
so.
So we can add groups.
Let's go ahead and add another group.
Well, call this group, H.R..
Well, I had a group for sales and maybe we'll use those in a future lecture.
So add a group and delete group if we want to modify the group once we've created it.
That's the group mod command so we can modify the group I.D. We can modify the name, we can change
the password.
And different other things.
So the group information as we know is in the AC DC shadow file.
So we didn't give it any chance to actually make the change.
If you do group mod, if you mistyped the command or you type it in the wrong case, you won't get the
actual any response back.
So let's go ahead and change the name.
Oh, add that syntax backwards.
So when you're changing the name of your modifying, you have to put the what you want to change it
to first, then the actual group
and now.
We should be able to.
Return that information and we'll see the actual ruthlessness there.
So if we want to do a add a user to a particular group, we can do that.
We just have to use a different command called the User Mod Command.
So let's go ahead and add a user to a particular group.
And the to the screen, there's the user mod command.
So it tells us we can modify the user account.
So if we want to append that user to a group, we use that with the dash g option for the group name.
You can.
Change the comments.
You can do different things with the user account, make it interactive, you can change the password,
you could change the user shell.
There's a lot of things you can do with this command, but right now we're going to focus just on the
group.
We're going to do user mod, dash a, dash g, and we're going to put in.
The actual group that we want to change do.
Which is going to be the user group and we're going to add user one to that user group.
And so we don't have that user.
All right.
We changed the we changed the name, didn't we?
So we got to make it new user group.
And now that user account has been added to that group.
So let's add the other user account we created to a different group.
User might dash a dash g or add the user to to the group.
And there we go.
And with the group's demand, we can see what users are and which groups.
So let's go ahead and do groups and with the user one and we'll see that user one is part of new user
group.
We'll do the group's demand for user two and we'll see that they're part of the group.
So our commanders are accessible and that's what we wanted to happen.
Now let's talk about configuring services inside of our Kellie Linux distributions.
That's important because at some point we may want to look at different services that are running.
If we do the Command D package with a uppercase L and a package name, it will list us all the files
that are included in that particular package.
So make sure the screen you package dash l just one dash, not multiple.
And because Linux is case sensitive, I want to make sure that we're following the convention and there's
all the different packages that are part of the TCP command.
Let's say maybe I wanted to find out what all the packages are.
As part of Wireshark, I can do that.
So that's the Dash l command.
See if I can zoom in a little bit to make this.
A bit bigger for you guys.
So we have the D package dash s command, which will show us any metadata that also comes with that
package or any requirements.
So for example, if the installs Okay or 30 things that it might need to be able to function.
And that tells you a little bit about the package itself and what the package actually does.
Let's go and look at the main page.
Z packages an important program to understand.
It is a package manager for Debian or debian based Linux.
Obviously if you want to.
Be able to understand.
The descriptions are not going to be useful.
So I always consult the software developers.
Documentation, but you have the main pages and you also have the RD package command.
So you can see if there are any packages that have been held for installation.
You can actually force commands to packages to install.
You can remove packages install even with DX package.
And many, many other things.
So let's talk about services.
So we want to be able to work with services.
That's changed a little bit in Lennox of some of the newer versions, but it's important to understand
both ways to.
How to run services.
Services run as from configuration files in the case of as a sage or secure shell.
Sage allows you to remotely log in to a machine transfer files and run commands.
So the tool is sage or sometimes called open access.
H, but it runs a service called the SS H Damon and open SS age is installed by default, but the SS
H service is disabled.
So let's go ahead and get that service started.
We're going to use the system ctrl command start ss h.
And we should system CTL status.
SSA should see that in fact, running services server is running by vendor.
It's supposed to be disabled.
We can also set it if we want it to run en route by using the system ctrl command enable as h.
So notice it's going to write that information or that script.
So when.
Kelly Lennox, boots up, sage will automatically be available, which is particularly useful, especially
if you're going to be moving in and out of command shells and doing other things with your Linux distribution
to clear the screen.
So these same results can be gotten by using the service as a sage status command or essentially service,
and then the name of the service and then status.
So any command can be pretty much gone.
You can also do service status all in older distributions.
So in some cases, some versions of Linux will have different commands.
So if you type the service, the staff status, all, it'll return all the services.
It are running and it has a plus sign.
I mean, it's actually running.
So in here there's a plus sign next to SSA.
So it's currently running, but any one of these other services can be called.
So we will come back to this command.
But I definitely want you to understand how to stop and start services, because from a security perspective,
services can help you or they can also give you a way if you're doing a particular type of.
Pen test.
So as the stage runs the stage.
Damon And then we can configure different things.
Many servers will have SSD keys stored in the tell the slash dot SSA directory stage listens by default
on port 22.
But we can we can change that.
But if you change the Sage Zaman egg file, you have to reload the service or restart the service.
So let's go ahead and clear the screen.
And we're going to go ahead.
And what we're going to do is we're going to go ahead and generate some SSD guys with the SSD Key Gen
Command.
And what that will do.
We can actually specify parameters.
We don't have to, but it just makes it a little more complicated.
But there's no there's no requirement to do so.
If we press enter, it's going to generate a public private RSA key player RSA as the encryption algorithm
named after the people who created it, Shamir and Adelman.
And it's going to ask you, what final do you want to see the key in?
So it's going to give you the root Slashdot Sage directory and then the name of the key.
So you can just leave it default, hit, enter and it created that directory.
And if you want a passphrase to add some extra randomness, that's fine.
If not, we're not going to worry about it.
So notice it tells you where your ID is saved at your public key.
And then it also does a SHA256 hash of that key and some random ASCII art that goes to it.
But if we got out to the screen
in the SS directory
that put a tilde in there, there's our open SSL private key.
So we actually just created that ourselves.
This is not one we've obtained from a server, but it's very common.
You might need to create an SS key to be able to log in securely to a virtual machine or to a web server
or something like that.
If we change to that directory next to the screen and we'll do the last command will notice, there's
your public key and your private key.
So the private key
is much shorter.
And it also gives the I'm sorry, the public key is much shorter.
So when you log into a server, you might see other users public.
He's in this particular folder.
So this is very, very common and it's an important concept to understand.
So let's go look at the SSA config file.
So we're going to look in the Etsy Association directory so we can see the Essence HD on our store config
file.
And we're going to edit that with a text editor in this case, Vim.
And we can see it's pointed to a particular path of where it wants to look.
So this is the system wide file.
In this case, we can notice everything that's in blue.
These are all commented out.
If there's no hash tag in front of it, that means that it's enabled.
So you can make some changes here, such as the default port that you wanted to run on.
So you can uncomment this line by pressing the answer key.
And we could actually change the port.
And notice the syntax also highlighted with it as well.
So maybe you wanted to change it to a higher level port number, for example.
So maybe we want it to be 49,102 or something like that.
So we make our change, we hit the escape, we write it to the file.
And then we're going to have to do we're going to have to change.
We're going to have to reload the config.
But
and there we go.
See, it's active and it's running and it will be talking on.
A different port.
So let's go ahead and exit out.
Now we're going to talk about some of the.
Databases that you might see on telly.
One x PostgreSQL is a database server, it's relational database.
Some services will access the database over the network and might need authentication from the database.
So if we want to start the database, we'll have to go into our command line and we can query that service
just like we can.
Anything else?
I'm going to change back to the home directory.
And we're going to use the service Oscar sequel status.
We can see that it's loaded, but it's not currently running.
You can do the same thing with the system Ctrl command.
So if we want to start, we can start the Postscript Sequel Service and it'll take a moment and then
that database will be open by default.
Postscript Sequel Lessons on TCP Port 5432 and on that particular socket in the VAR Ron Postscript sequel
directory.
Let's throw a change to the wrong directory.
And there's the PostgreSQL directory
and we can see some different things in here.
Notice it has a lock on the file and it's calling because we don't want to have mistakes made or unauthorized
changes made.
So there is a in the AC directory as where most of the configuration is.
So we can see in here in.
Okay.
This is version 12.
And we can see here there's the different config files with Postgres.
The Postgres sequel, not config file is kind of carried it out to the screen so you can see what it
looks like.
I may not have to mess with it too much unless you're doing some customized operations.
But essentially the PGA underscore HPR dot config file will define who's allowed to connect and how
they're authenticated.
So you can set up if you want, customize extensions here.
So if you want, this is kind of almost like your firewall, for example.
Where do you want to allow connections?
Of course you don't want to disable the rules.
These are just the different networks from which.
If you want to allow connections that are non-local, you have to add more hosted records.
So let's talk about some more configuring the services.
So services like Metasploit and others require the PostgreSQL service.
And.
PostgreSQL allows for multiple versions of the database to be installed and what they call clusters.
You can actually create new users with respect to PostgreSQL.
And new roles so we can switch over to the.
Postscript User account.
And we're going to say we want to go ahead and create user mindset for Metasploit framework, be that
apps that are ready, that's going to ask for a new password.
And there we go.
So we've created a new user account.
Notice I didn't type exit properly.
I type it in all caps, so it did not work correctly.
So if you wanted to drop that user.
You could do that.
There's also the.
So we need to remove our PostgreSQL account.
Of course, only super users and users that have the appropriate role in remove PostgreSQL accounts.
So of course you have to be able to sudo to root.
You can also use you can create databases.
Let's go ahead and do that.
So if you want to create a new Postgres database, you'd give it a connection option.
The normal way, if you're the one creating it, you'll be the owner.
Unless you want to specify a different.
Database type, you can put the location, the version number, many other things.
There's usually some different options.
So you could set it to be on a certain court number.
In this case, we'll go ahead and create the database and just call it demo.
And because we don't have route, that did not work.
So you can see that the new versions of Kelly have locked it down somewhat, but just know that this
is basically the same process that you're going to follow.
So if you want to create a new super user account, you also have to create connect as a super user,
not just for the create role privilege.
So if you're a super user, that means you can bypass all the service permission checks within the database.
So you want to keep your super user control.
Close hold should not be granted lightly.
You can also use the drop user command
to remove an account and you could do the drop DB command to remove a database entirely.
So there's no real difference between creating databases from the command line and doing it from the
graphical utility.
But at least now you've seen multiple ways of doing this process.
So.
And there are some important tools to manage these different clusters.
There is post breast create cluster, job cluster.
There are if you want to list out the different clusters that are there.
So these things may change from.
Version two version.
Yes.
I made a typo there.
So there's only one cluster right now listening on 5432.
If I want it to create a cluster, we can do that.
It was call it new.
So you have to give it some options.
Who owns it?
The by the.
So that's beyond the scope of this course, getting in too much into the weeds.
But we will.
So it's important to understand the different types of databases, especially as a hacker or Linux tester,
because you may have to probe certain databases and different databases.
Between my sequel and Postgres, they'll have slightly different commands.
Which we may cover in future lectures.
So how do we configure the web server?
So besides having a database, we might have to have a web frontend component.
Generally, Apache is the most common web server that's on the Internet.
Most of the web services, I think like 60% of all web servers run Apache.
So Apache created the PDP server project as an effort to be able to maintain an open source server for
modern operating systems.
And essentially the idea was that it would be modular.
It would be very easy to work with and add new functionality.
Let's see.
And the newer version, the Linux, it's named Apache two by the version is one version 2.4, I believe
was the latest version if you wanted to find out more information.
About Apache,
you can go to B, D as in it's named after the HDP Daemon.
You could go to that particular resource and they will show you information about the latest and greatest
versions, all the different modules.
And you can see it's been the most popular server since the nineties and this year it celebrates its
25th anniversary.
So it's a, well, well-supported, well-documented web server, although from a security perspective
that also makes it a big target because it's installed a lot of places.
So let's go ahead and look at some things we can do with Apache.
So we can see the same commands with the system, the versus the service commands.
So let's go ahead and Service Apache two and let's go ahead and start it and we'll see that it'll take
a moment and then.
We can query it now.
It's active and it's running and we can see that.
If we go to a web browser inside of our Kali Linux distro, we will see a default web page.
Let's go to our.
Usual applications and we'll open up they have they've added in the newer versions they've added in
chromium seven or Firefox.
So we can have a web browser and we'll put in the local host IP address.
Or the 120 7.0.0.1 address.
And we'll see that we have the Apache default Web page.
So this is.
This shows the location of the Apache config file.
Any ports that are open, what modules are enabled.
So of course, you want to disable this from a security perspective.
And most of the Apache website files will be located in the var slash w w directory.
So let's go back to our slides here.
So.
Once we create Apache or once we enable Apache, it has different modules that we can use.
We can enable mods with it.
You can use the.
You can use the A2 and Mod Command.
So if you need to enable or disable an Apache module, you can do so.
You can set it to quiet mode so it doesn't show informative methods or messages.
There's other commands, like the Apache two controller.
We're working with Apache Services.
So this is the Apache server control interface.
So it takes more simplified one word commands.
So if you want to make quick changes to it or you want to start the Apache so you can do Apache two
controller start.
So it's going to invoke the system CTL command as well.
So it's already running.
So what if we change this to stop?
So now we'll notice that the Apache server is no longer running.
So let's go ahead and start it again.
And we have our web server running.
So on Apache and its config file, it can load what are known as virtual hosts.
These are essentially extra identities for the web server.
So you can have multiple hosts on a web server.
The default virtual host is in the Apache two default config file and then every virtual host after
that gets described by the site's available.
So you can do a minimum virtual host for the website which is stored in the slash service slash every
WW dot example dot com.
Let's go ahead and look at the Apache config file.
And there's the default Apache config, follow the default virtual host.
So you can see that the document route is the route where all the websites go.
You can see the server admin.
This is the webmaster or the person that manages the website.
So a lot of information can be obtained from this file.
So you want to guard this file very carefully.
So let's talk about some more things requiring authentication.
So if you want to run additional directives outside of the normal Apache config file, one of the ways
to do that is through something called an access file.
This access file is essentially a distributed configuration file.
So every time a request comes in, that HD access file will handle those requests.
And this is done normally on a per directory basis.
So you can rename access files.
Something else using the access file name directive, and you could also allow one to be overridden
or not.
So in this case here, if you want to require authentication, you could require a valid user using
the off named private directory and you could set the.
Authentication user file app that etsi apache to all files slash hd password dash private.
So some extra information.
Typically, we've talked about the network manager, we've talked about command line tools.
We've talked about different ways of managing users and group accounts.
We've talked about adding users.
We've talked about CCH.
We looked at PostgreSQL as well as Apache.
So in summary, we talked about configuring the network, the different ways with desktop command line
using system.
We looked at managing accounts, creating accounts, disabling accounts.
We looked at different ways to configure services like Sage and the Apache game.
And we we looked at PostgreSQL SQL Services, we looked at setting up Sage for remote log ins and how
to generate sage keys for particular servers.
And now you should be more familiar with working with daily Linux and particular services networks and
user accounts.