apol suggestions
I've just done a search to discover what can get read or write access to /etc/shadow. For such a search it would be good if I didn't have to click on each of create read write setattr relabelfrom, etc. I would like to have groupings of access such as the following:
read_group: read ioctl relabelfrom execute execute_no_trans
write_group: write append create relabelfrom relabelto ioctl link rename setattr unlink
Note that I didn't put getattr in the read group because often getattr access is granted just to quiet ls or to satisfy other checks when no other read access is granted. We can't rely on people selecting 10 items correctly from a list if performing repetitive operations.
Also is a batch interface to apol planned? I would like to have #!/usr/sbin/apol at the start of scripts...
My search of shadow_t access showed that there are 12 domains granted access directly and 9 granted through posession of the "auth" attribute. Even when two lists are so small it's difficult to determine which entries overlap (especially when they can't both be fully displayed on the screen at the same time). If the "Type Enforcement Rules Display" box could be made to fill the entire screen then it would be a little easier for some analysis tasks. Also if there was some way of displaying the domains that can do the access through the auth attribute as well as through direct policy rules in the one list then it would solve this entire problem for me.
Another thing, the "Type Enforcement Rules Display" box is sorted by line number in policy.conf. This is usually OK as we try to group things in the policy source. But it would be nice if we could change the ordering to sort by source domain or target domain.
Signature · 9 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 19 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Russell Coker
Sent: Wednesday, September 29, 2004 7:28 PM
To: SE Linux
Subject: apol suggestionsI've just done a search to discover what can get read or write access to
/etc/shadow. For such a search it would be good if I didn't have to click
on each of create read write setattr relabelfrom, etc. I would like to have
groupings of access such as the following:
read_group: read ioctl relabelfrom executeexecute_no_trans
write_group: write append create relabelfrom relabelto ioctl link rename setattr unlink
Quoted 7 lines
Note that I didn't put getattr in the read group because often getattr access
is granted just to quiet ls or to satisfy other checks when no other read access is granted. We can't rely on people selecting 10 items correctly from
a list if performing repetitive operations.
The best interface might be to allow users to create their own groupings of permissions named whatever they want, because as you point out the semantics are not always clear or universally applicable. For the overt information flow search you are doing, excluding getattr certainly seems appropriate because you are only concerned about the flow of the data contained in the file. For other situations that might be less appropriate, and providing a canned grouping for users might lead them to inappropriate conclusions. I'll add this to the todo list.
It seems that you are using the plain rule search - any reason you are not using one of the information flow analysis modules? The query you seem to be doing is really a direct information flow analysis, which has a very nice interface (the permission map editor) for specifying what is a read or write. It even allows you to specify a minimum "weight" so that you can, for example, exclude covert channel types of permissions if you are only interested in overt information flow. We have a bug report about the weight exclusions not working that we are still tracking down, so if it doesn't work for you expect the next release to include a fix.
Quoted 3 lines
Also is a batch interface to apol planned? I would like to have #!/usr/sbin/apol at the start of scripts...
I agree and this is something that we are actively working on. The first step will be the creation of a higher level language for stating information flow properties and checking whether a policy exhibits those properties. This is useful for regression testing a policy for example.
As far a general scripting interface, I'm not certain if or when that might happen. For the time being it is possible to write fairly short C programs that link to libapol. The libapol interface, though not well documented, will allow you to do any of the analysis that is possible with apol. See the test directory in the setools package to get some ideas.
Quoted 11 lines
My search of
shadow_taccess showed that there are 12 domains granted access
directly and 9 granted through posession of the "auth" attribute. Even when
two lists are so small it's difficult to determine which entries overlap (especially when they can't both be fully displayed on the screen at the same
time). If the "Type Enforcement Rules Display" box could be made to fill the
entire screen then it would be a little easier for some analysis tasks.
It is not entirely obvious so I'm not certain whether you noticed, but you can resize the display, though not to take up the entire display. I think the best option might be allow the result tabs to be detached. We'll see about doing something on this, but unfortunately these types of gui enhancements are lower priority than the functional enhancements we have in the works.
Quoted 6 lines
Also
if there was some way of displaying the domains that can do the access through the auth attribute as well as through direct policy rules in the one
list then it would solve this entire problem for me.
Checking "include indirect matches" will do this and the information flow analysis does this by default.
Quoted 7 lines
Another thing, the "Type Enforcement Rules Display" box is sorted by line number in policy.conf. This is usually OK as we try to group things in the
policy source. But it would be nice if we could change the ordering to sort
by source domain or target domain.
That's a good idea. We'll add it to the todo list.
Thanks for the feedback,
Karl
Karl MacMillan
Tresys Technology
http://www.tresys.com
(410)290-1411 ext 134
Quoted 11 lines
--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 10 lines · Karl MacMillan
Quoted 6 lines
Note that I didn't put getattr in the read group because often getattr access
is granted just to quiet ls or to satisfy other checks when no other read access is granted. We can't rely on people selecting 10 items correctly from
a list if performing repetitive operations.The best interface might be to allow users to create their own groupings of permissions named whatever they want, because as you point out the semantics are not always clear or universally applicable. For the overt
Good point.
However having some default values such as the ones I suggested would be good. Also a ~/.apol configuration directory for these things would be handy.
Quoted 5 lines
information flow search you are doing, excluding getattr certainly seems appropriate because you are only concerned about the flow of the data contained in the file. For other situations that might be less appropriate, and providing a canned grouping for users might lead them to inappropriate conclusions. I'll add this to the todo list.
Thanks.
Quoted 4 lines
It seems that you are using the plain rule search - any reason you are not using one of the information flow analysis modules? The query you seem to be doing is really a direct information flow analysis, which has a very nice interface (the permission map editor) for specifying what is a read or
I haven't got to working with that area of functionality. I'll have to look at it.
Quoted 7 lines
Quoted 2 lines
Also is a batch interface to apol planned? I would like to have #!/usr/sbin/apol at the start of scripts...
I agree and this is something that we are actively working on. The first step will be the creation of a higher level language for stating information flow properties and checking whether a policy exhibits those properties. This is useful for regression testing a policy for example.
Yes, that's the idea.
Quoted 5 lines
As far a general scripting interface, I'm not certain if or when that might happen. For the time being it is possible to write fairly short C programs that link to libapol. The libapol interface, though not well documented, will allow you to do any of the analysis that is possible with apol. See the test directory in the setools package to get some ideas.
OK, but I don't want to write C programs to do policy analysis. Some people who want to analyse policy may not even know C.
Quoted 11 lines
Quoted 10 lines
My search of
shadow_taccess showed that there are 12 domains granted access
directly and 9 granted through posession of the "auth" attribute. Even when
two lists are so small it's difficult to determine which entries overlap (especially when they can't both be fully displayed on the screen at the same
time). If the "Type Enforcement Rules Display" box could be made to fill the
entire screen then it would be a little easier for some analysis tasks.
Quoted 2 lines
It is not entirely obvious so I'm not certain whether you noticed, but you can resize the display, though not to take up the entire display. I think
I noticed. But on a 1024x768 display the maximum size that I could make it was not adequate for my needs. I think that there are few people who have displays large enough to get the viewing area that they are likely to desire for this. I doubt that any laptop on the market is really up to it.
Quoted 1 line
the best option might be allow the result tabs to be detached. We'll see
Sounds good.
Quoted 8 lines
Quoted 5 lines
Also
if there was some way of displaying the domains that can do the access through the auth attribute as well as through direct policy rules in the one
list then it would solve this entire problem for me.Checking "include indirect matches" will do this and the information flow analysis does this by default.
(3120) allow auth shadow_t : file { getattr read };
(65452) allow anaconda_t file_type : { dir file lnk_file sock_file fifo_file chr_file blk_file } * ;
Above is part of the results of a policy analysis. I searched on "read" and "write" access to "file" class of type shadow_t. When I didn't select "Include Indirect Matches" the anaconda_t entry was not included in the results.
However what I am really after is to have a list of what matches the attribute "auth" which seems to be impossible under setools 1.4.1. Something like "Include Indirect Matches" for the source context would solve this (the button is there but it's always disabled).
Quoted 1 line
Thanks for the feedback,
This is only the beginning, I'll be using apol a lot in the near future... ;)
Signature · 9 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 21 lines
-----Original Message-----
From: Russell Coker [mailto:[email protected]]
Sent: Thursday, September 30, 2004 3:59 PM
To: Karl MacMillan
Cc: 'SE Linux'; 'Selinux-Dev'
Subject: Re: apol suggestionsQuoted 7 lines
Quoted 2 lines
Also is a batch interface to apol planned? I would like to have #!/usr/sbin/apol at the start of scripts...
I agree and this is something that we are actively working on. The first step will be the creation of a higher level language for stating information flow properties and checking whether a policy exhibits those properties. This is useful for regression testing a policy for example.
Yes, that's the idea.
Quoted 1 line
As far a general scripting interface, I'm not certain if or when that
might
Quoted 1 line
happen. For the time being it is possible to write fairly short C
Quoted 9 lines
programs
Quoted 3 lines
that link to libapol. The libapol interface, though not well documented, will allow you to do any of the analysis that is possible with apol. See the test directory in the setools package to get some ideas.
OK, but I don't want to write C programs to do policy analysis. Some people
who want to analyse policy may not even know C.
I know, but that is the interface that is available now. Also, I think that people are more likely to want an easy to use special purpose language than a general language binding for libapol. Libapol reflects the complexities of the policy fairly directly and gives back lots of information - not necessarily what a policy analyst wants to think about. How about this - as you run into cases where you really want a scripting interface let me know the details so I can get a better idea of the types of things you are wanting to do.
Quoted 19 lines
Quoted 3 lines
Quoted 3 lines
My search of
shadow_taccess showed that there are 12 domains granted access
directly and 9 granted through posession of the "auth" attribute.Even
Quoted 2 lines
Quoted 2 lines
when
two lists are so small it's difficult to determine which entriesoverlap
Quoted 1 line
Quoted 1 line
(especially when they can't both be fully displayed on the screen at
the
Quoted 2 lines
Quoted 2 lines
same
time). If the "Type Enforcement Rules Display" box could be made tofill
Quoted 2 lines
Quoted 2 lines
the
entire screen then it would be a little easier for some analysistasks.
Quoted 2 lines
It is not entirely obvious so I'm not certain whether you noticed, but
you
Quoted 1 line
can resize the display, though not to take up the entire display. I
Quoted 9 lines
think
I noticed. But on a 1024x768 display the maximum size that I could make it
was not adequate for my needs. I think that there are few people who have displays large enough to get the viewing area that they are likely to desire
for this. I doubt that any laptop on the market is really up to it.
I agree, but there is a limit to what we can do. We will continue to try to keep space efficiency in mind.
Quoted 26 lines
Quoted 1 line
the best option might be allow the result tabs to be detached. We'll see
Sounds good.
Quoted 3 lines
Quoted 3 lines
Also
if there was some way of displaying the domains that can do the access through the auth attribute as well as through direct policy rules inthe
Quoted 4 lines
Quoted 2 lines
one
list then it would solve this entire problem for me.Checking "include indirect matches" will do this and the information
flow
Quoted 1 line
analysis does this by default.
(3120) allow auth
shadow_t: file { getattr read }; (65452) allowanaconda_tfile_type: { dir filelnk_filesock_filefifo_filechr_fileblk_file} * ;Above is part of the results of a policy analysis. I searched on "read" and
"write" access to "file" class of typeshadow_t. When I didn't select "Include Indirect Matches" theanaconda_tentry was not included in the results.
Quoted 6 lines
However what I am really after is to have a list of what matches the attribute
"auth" which seems to be impossible under setools 1.4.1. Something like "Include Indirect Matches" for the source context would solve this (the button is there but it's always disabled).
OK - I understand. Include indirect matches is disabled when attrib is checked, but it shouldn't be - what you want is to see all the rules that reference auth or any type in auth in the source type. I'll add this to the todo list as well.
Just another plug for the information flow analysis - if you had have used direct information flow analysis you would have seen all of the types that can read/write shadow_t directly, without having to worry about specific permissions or attributes.
Quoted 5 lines
Quoted 1 line
Thanks for the feedback,
This is only the beginning, I'll be using apol a lot in the near future... ;)
Great - I'm glad to hear that you will be using apol. We always try to respond to suggestions as much as our resources and internal priorities allow.
Karl
Karl MacMillan
Tresys Technology
http://www.tresys.com
(410)290-1411 ext 134
Quoted 5 lines
--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.