Part 4 Defenses

Video Activity

This lesson offers a defenses overview; specifically designing access controls and implementing access controls. Participants also receive a sample of Java Code focusing on access controller checks.

Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *

Already have an account? Sign In »

9 hours 31 minutes
Video Description

This lesson offers a defenses overview; specifically designing access controls and implementing access controls. Participants also receive a sample of Java Code focusing on access controller checks.

Video Transcription
Hello and welcome to the cyber very secure coding course my name miss anywhere, and this is a loss. Top 10 for 2013
a seven missing function level access controls, mitigations, countermeasures and defenses. Now, first, an overview of the defenses available.
They fall into two main areas. Designing access controls and then, of course, implementing those access controls.
Now, when designing them, you really need to create a role based access control matrix
in the example that we're going to take a look at. We are focused on people but realize that role based access control and the building of a matrix could also extend into classes that you would load at runtime. So please consider that in your design as well.
Now implementing access controls can basically fall within two areas. There would be the policies and the policies air going to define who can access what And then, Of course, there's the application code, which really adds the enforcement of those policies.
Now policies can be set at a file system level. For example, if you want to restrict ah, particular account to Onley access, a particular directory
policies can also be set at a database or data set level. This is commonly done in racket for a CF two on mainframe systems.
And then, of course, there are policies that are set inside of the security policy file of a programming language itself. We see this in the C sharp in job of languages.
Now in our application code, one of the ways that access controls are implemented is through our back that role based access control were basically inside of each function or each operation. The application programmer will perform some sort of check to ensure that
an operation is only performed by a particular role.
I'm also going to show you how you can use something called the Axis controller. Check inside of your code, and this is, of course, applicable. Four c sharp in Java.
Now, when designing access controls, you want to build some kind of matrix that identifies on the left hand side all of the roles that are going to be inside of your application.
Then at the top. You want to identify all of those operations that are available for the entire application,
and then you want to restrict which rolls can perform. Which actions
now. This provides two applications of security principles
the principle of least privilege and this and ensures that users only have enough power that they need in order to perform their job,
as well as a separation of duties, which I had mentioned previously. And this is what we want to restrict, for example, the application administrator from being allowed to do anything else in the application.
Now I realize that this is not commonly done, but this is something that should be done in situations where system is already designed and you're trying to retrofit access controls in.
You should probably implement monitoring
to ensure that no one user over extends their privilege. Now implementing access controls,
as I mentioned on the overview slide can be done at different levels. The file system, the database, the data set.
Some languages actually offer a security policy that can identify the accessing of maybe directories or even classes. And Java is one example. And so you're actually looking at the policy
tool that's being used to read the job
security policy file.
What I have here is a restriction of the temp directory to read and write, and it can only be done by classes that are permitted to do so
now. The enforcement of these custom rules added to the policy file
are actually done by a special class called the Axis Controller. So the access controller class
basically has tthe e. J VM performed these runtime checks against the job of security policy Farm.
Now the security policy file is going to have some default rules in there. Depending upon the application server that you're running,
you may or may not have to actually turn on the security manager.
Some application servers already have it on by default, for example, IBM WebSphere.
But if you want to add custom rules to that, you would have to actually use the policy tool to do so
and then to enforce that rule,
you need to add something like the axis controller dot do privileged method,
uh, in wrap that around the sensitive operation. In order to ensure that the J B. M does perform this permissions check,
there's a similar class and security policy available for C Sharp
now in addressing the forced browsing or failure to restrict you are real vulnerability.
What we could do and say our dot net application is actually
modify the web dot config file
to deny all users the ability to see any other pages and on Lee, allow specific users or specific role
to to see certain pages
via you are well on our website. Of course, this needs to be refined even more. You need to make sure that your sequel statements are not open ended, that they have that additional level of restriction inside of your wear clause
to ensure that only the account owner's heir seeing their own information, etcetera.
Now we're gonna move into the lab portion of our module.
Up Next