IBM Security Z Security

Security for Z

Join this online user group to communicate across Z Security product users and IBM experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  zSecure AU or zCARLa ability to display or report OMVS USS data?

    Posted Wed September 20, 2023 09:25 AM

    Hello, 

    I am trying to use zSecure for various audit items my group needs to produce.  Can zSecure or zCARLa produce a report or display on the values in the OMVS USS filesystem, like '/etc/profile' for the 'umask=nnn' value, or the value of parameters used in the GSKSRVR for it's TCPIP.PAGENT when it initializes.  I'm new again to zSecure and trying to figure out how to use zSecure for all the audit items requested in addition to the RACF access which zSecure easily reports on. 

    Thanks for taking my question.  



    ------------------------------
    Lynn Gilson
    ------------------------------


  • 2.  RE: zSecure AU or zCARLa ability to display or report OMVS USS data?

    Posted Tue October 03, 2023 10:59 AM

    Hi Lynn,

    that is a very generic question about the zSecure and CARLa capabilities for reporting about OMVS USS filesystem configuration and security settings. I am not quite certain if my interpretation of your question is accurate but I will attempt to provide you with some general pointers about OVMS/USS reporting in zSecure.

    zSecure Audit supports a large variety of USS- and TCP/IP-related reports:

      • Option: Resource - IP stack (RE.I) produces up-to 14 different standard reports about TCP/IP settings and configuration depending on the reports that you select in the UI.
      • Option: Resource - UNIX (RE.U) provides a wealth of information about the configuration, security, and audit settings of USS file systems.
      • CARLa supports newlist types SYSTEM, UNIX, and 13 different IP-* newlist types that enable you to code your own TCP/IP reports or displays. 

    These options might not provide answers to all examples that you mentioned in your question about OVMS USS reporting, but they might be helpful for a number of the audit items that your group needs to produce. 

    For example, I know that zSecure supports field ETC_PROFILE_UMASK in newlist type SYSTEM  to report the umask of /etc/profile that you mention. However, according to me, zSecure currently does not support reporting about the content of the GSKSRVR configuration file.

    I hope that you find this answer to be helpful. 



    ------------------------------
    Tom Zeehandelaar
    z/OS Security Enablement Specialist - zSecure developer
    IBM
    ------------------------------



  • 3.  RE: zSecure AU or zCARLa ability to display or report OMVS USS data?

    Posted Wed October 18, 2023 01:08 PM

    Thanks Tom for your help.  Could I somehow include the 'etc_profile_umask' from the 'SYSTEM Newlist' information into this report already included with zSecure 2.4.0?  Here's what I like so far:

    n type=UNIX nodetailinherit name=UNIX1L,                                  

     ,                                                                        

     st="Files for paths resolving to /etc/profile"                           

     define type=unix any_acl true where extended_acl or,                     

       file_default_acl or directory_default_acl                              

     select ABS_PATHNAME="/etc/profile"                                       

     sortlist | rel_pathname(nondispl),                                        

              type attr any_acl("+",1,hb),                                    

              extattr auditflags owner(firstonly) group(firstonly),           

              rel_pathname(wrap 43) inode(10),                                

              uid(10) gid(10) link_count(10),                                 

            / "   Link target  :"(ne) link_target(wrap,0),                    

            / "   Audit concern:"(ne) auditconcern(wordwrap,0),               

            / "   Sensitivity  :"(ne) priv_senstype priv_concern(wordwrap,0)  

     summary / "Complex  System   Device",                                    

               "HFS mount point" ,                                             

             / complex system hfs_mountpoint(nondispl),                       

               dev(10) hfs_mountpoint(0,wrap) / /,                            

               "          T Filemode  + apsl AuF Owner    Group   ",          

               "Relative pathname (within HFS)                  ",            

               "Inode    User id   Group id Hard links" /                     

    \/                                                                        

    /*            

    If I could include 'etc_profile_umask' in the Summary somehow - that would get it for me. 

    Many thanks for help.

    Lynn                         



    ------------------------------
    Lynn Gilson
    Lynn
    ------------------------------



  • 4.  RE: zSecure AU or zCARLa ability to display or report OMVS USS data?

    Posted Wed October 18, 2023 03:52 PM

    Hi Lynn,

    If you are current on maintenance, then the field is available with zSecure 2.4. It was added in the December 2020 service stream enhancement.

    I think that the field can be included into the TYPE=UNIX summary, but the way I can think of is somewhat involved: write a SYSTEM report to an external file with SYSTEM in one column to serve as key for looking up ETC_PROFILE_UMASK. Then in another CARLa run, read that in as a DEFTYPE input file and do a lookup from the SYSTEM field in TYPE=UNIX. (This is assuming you do not have duplicate SYSTEM names.)

    Regards,



    ------------------------------
    Jeroen Tiggelman
    IBM - Software Development and Level 3 Support Manager IBM Security zSecure Suite
    Delft
    ------------------------------



  • 5.  RE: zSecure AU or zCARLa ability to display or report OMVS USS data?

    Posted Wed October 18, 2023 05:02 PM

    Thanks much for your help.  We are on 2.4.0 and I confirm with the dialog in zSecure ISPF for the Data Dictionary  (IN.D.1) for 'newlist SYSTEM.  The resulting list shows the 'ETC_PROFILE_UMASK' field .

    Are there any samples of writing the SYSTEM report to pull that one element 'ETC_PROFILE_UMASK' to a sequential file and using as input to the next CARLA step?  

    Many thanks for your reply.

    Lynn



    ------------------------------
    Lynn Gilson
    Lynn
    ------------------------------



  • 6.  RE: zSecure AU or zCARLa ability to display or report OMVS USS data?

    Posted Thu October 19, 2023 02:21 AM

    Hi Lynn,

    What I would do is first design the layout for my sequential file using option CO.C. (You can jump there with the CARLA primary command.)

    In this case, I could envision having a very simple file with just two columns, one containing the SYSTEM name to look up from, and one containing the ETC_PROFILE_UMASK value for that system.

    Essentially,

    n type=system                       
    sortlist system etc_profile_umask   

    When running that with a couple of systems, that could give me:

    S Y S T E M   S E T T I N G S   18 Oct 2023 23:45 
                                                      
    System   PUm                                      
    ZS17     ----w--w-                                
    ZS34     ---rwxrwx                                

    In this case, I think it is unlikely that "S Y S T or "System" would match an actual system name (since those are length 4 on z/OS and don't contain intermediate blanks), but as a general rule when you create these files you add a NOPAGE directive to suppress the headers. And of course you need to write them to a file. So you'd do something like

    alloc type=output dd=mydd dsn=your.data.set
    n type=system nopage dd=mydd                          
    sortlist system etc_profile_umask                     

    And then you need to write a DEFTYPE layout for the resulting file. Note that the offsets depend on the file type. 
    In my case, I am using an FB80 right now, so I have a lower offset than when I would have used a VBA file (which has an A column).
    So my system name is in columns 1-8 and my umask is in columns 10-18.

    So then I write a layout for the file, and I can also do a test query to show that it is working as I expect:

    deftype type=mytype                                        
    define type=mytype system('System' 8) as substr(record,1,8)
    define type=mytype umask('Umask' 9) as substr(record,10,9) 
    alloc type=mytype dd=mydd dsn=your.data. set
    n type=mytype                                              
    sortlist system umask                                      

    Note that I specify the column name and width for the columns. If I omit that, those properties are inherited from the underlying RECORD field.

    So then in my UNIX query, I want to use SYSTEM as the key to find the UMASK via a DEFTYPE lookup.
    I can use a small UNIX test query like this:

    deftype type=mytype                                          
    define type=mytype system('System' 8) as substr(record,1,8)  
    define type=mytype umask('Umask' 9) as substr(record,10,9)   
    alloc type=mytype dd=mydd dsn=your.data.set   
    n type=unix                                                  
    summary system system:mytype.system.umask                    

    And in my case I see:

    U N I X   F I L E S   18 Oct 2023 23:45     
                                                
    System   Umask     Count                    
    ZS17     ----w--w-   234488                 
    ZS34     ---rwxrwx   153367                 

    And then I feel I am ready to add the construct to the query I really want to enhance. :-)

    I hope this helps.

    Regards,



    ------------------------------
    Jeroen Tiggelman
    IBM - Software Development and Level 3 Support Manager IBM Security zSecure Suite
    Delft
    ------------------------------



  • 7.  RE: zSecure AU or zCARLa ability to display or report OMVS USS data?

    Posted Thu October 19, 2023 03:09 AM

    Fields from the SYSTEM newlist can usually be added into reports from other newlist types using lookup or indirect reference.

    It follows that you could insert a line into your SORTLIST command like so

     / "   Compliant UMASK found:" :system.etc_profile_umask, 

    or

     / "   Compliant UMASK found:" system:system.system.etc_profile_umask, 

    since you will only list the attributes of /etc/profile.



    ------------------------------
    Rob van Hoboken
    ------------------------------



  • 8.  RE: zSecure AU or zCARLa ability to display or report OMVS USS data?

    Posted Fri October 20, 2023 06:16 PM

    Thanks very much Rob.  The new feature " :system.etc_profile_umask "  worked for me:

    --------------------------------------------------------------------------------------------------------------------------------------------------------

    n type=UNIX nodetailinherit name=UNIX1L,                               

     ,                                                                     

     st="Files for paths resolving to /etc/profile"                        

     define type=unix any_acl true where extended_acl or,                  

       file_default_acl or directory_default_acl                           

     select ABS_PATHNAME="/etc/profile"                                    

     sortlist | rel_pathname(nondispl),                                     

              type attr any_acl("+",1,hb),                                 

              extattr auditflags owner(firstonly) group(firstonly),        

              rel_pathname(wrap 43) :system.etc_profile_umask,             

              uid(10) gid(10) link_count(10),                              

            / "   Link target  :"(ne) link_target(wrap,0),                 

            / "   Audit concern:"(ne) auditconcern(wordwrap,0),            

            / "   Sensitivity  :"(ne) priv_senstype priv_concern(wordwrap,0)

    summary / "Complex  System   Device",                                 

               "HFS mount point" ,                                         

             / complex system hfs_mountpoint(nondispl),                    

               dev(10) hfs_mountpoint(0,wrap) / /,                         

               "          T Filemode  + apsl AuF Owner    Group   ",       

               "Relative pathname (within HFS)                 ",          

               "UMASK    User id   Group id  Hard links" /                 

    \/                                                                     

    /*                                                                  

    ------------------------------------------------------------------------------------------------------------------------------------------------------------

    Thanks very your help and the great information you provide in this xChange Community.    

    Lynn Gilson



    ------------------------------
    Lynn Gilson
    Lynn
    ------------------------------