20
Sat, Apr
5 New Articles

Five Hints to Help You Make Better Use of the IBM i Audit Journal

IBM i (OS/400, i5/OS)
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

With so much information in the IBM i audit journal, you have to know what you’re looking for. Otherwise, you may miss some important information.

Whether you’re using a product such as HelpSystems’ Compliance Monitor or getting information directly out of the audit journal yourself, this article will help you have a better understanding of what’s available.

I’m going to be referring to the IBM i Security Reference manual throughout this article. You may want to download and follow along.

Hint #1: Understand the Structure of the Entries

Numerous types of audit journal entries exist. One exists for each type of unique information that needs to be provided; for example, the CP entry that logs information about the creation or changes of user profiles contains different information from the authority failure (AF) entry, which is different from the audit journal entry that logs changes to system values (SV).

That said, each type of entry, while having unique information, also contains information that’s common to all entries. That’s called the “header” information. This common information is documented at the beginning of Appendix F in the Security Reference manual. Be sure to look at the *TYPE5 header information because it contains the most information and is the most current. The other *TYPEx entries are listed only for compatibility with older releases. The header contains information that can be quite helpful: the timestamp so you know when the audit journal entry was generated, the job information, the program and program library running at the time the entry was generated, and, when available, an IP address. The IP address is toward the end of the header in the Remote address field and is very useful when investigating the source of invalid sign-on attempts (PW) entries. Don’t look only at the fields that are specific for each type of entry; if you do, you’ll be missing quite a bit of information.

Hint #2: Know Which User Profile Name to Look For

Every audit journal entry contains at least two fields that refer to user profiles—sometimes more, depending on the entry type. The fields I want to focus on are in the header. The User name field is the name of the profile that makes up part of the job name, as in job number/job user/job name. This is the profile under which the job started. The User profile field is the profile under which the job was running when the audit journal entry was created. These fields may contain the same name, but when the job starts as one user and a profile swap occurs so that the job runs as a different profile, the names will be different. The best examples of this are the pre-start jobs that service ODBC connections. They start as QUSER, but when an ODBC request is made, the system swaps the job to run as the person making the ODBC connection. It’s rare that I examine the job user (the User name field.) My focus is generally on the profile that was running at the time the entry was generated: the User profile field. Using the User name field rather than the User profile field leads me down the wrong path when investigating issues.

Hint #3: Know Where to Look for IFS-Related Entries

I realize that the IFS is a bit of a mystery to some, but just as you can secure directories and objects in directories, you can audit them too. All actions that can be audited for libraries and objects in libraries can also be audited for directories and objects in directories—for example, authority failures, creation and deletion of objects, etc. You can also configure object auditing on IFS objects. The key to understanding the audit entries for IFS objects is knowing which field to look in. Your clue that the entry is for an IFS object is when the object name field is *N. That’s the sign to look near or at the end of the entry for the Path Name field, a character field that’s 5002 characters long.

Hint #4: Understand Object Auditing

To enable object auditing, you must include *OBJAUD in the QAUDCTL system value. Then use the Change Object Auditing (CHGOBJAUD) command to “turn on” auditing on specific objects. You can specify to audit the update of an object (*CHANGE) or to audit both updates and reads of an object (*ALL). (You don’t have the option to specify to audit only reads of an object.)

Once auditing has been enabled on an object, every time the object is read, an audit entry of type ZR will be generated. Examples include when a file is read or an SQL SELECT statement is run or it’s FTPed to another system or downloaded to a spreadsheet. Likewise, when the object is updated, an audit journal entry of type ZC is generated.

When do I use object auditing? When I’m trying to discover how and when an object is being used or when I’m trying to determine the processes using an object. For example, when the HelpSystems Professional Security Team is helping one of our clients change their security posture from one of wide-open access to restricted access, we need to determine what processes are accessing those objects—typically, physical and logical files. The best way to do that is to enable object auditing on those objects and then look at the ZR and ZC entries.

One thing I need to caution you on, however. When I’m trying to discover how an object is being used, I first look in Appendix E of the Security Reference manual. This appendix lists, by object type, the actions that cause a read (ZR) or update entry (ZC) to be generated. Some actions you might think should cause an entry don’t, so it’s best to check first.

Hint #5: Decipher the Two-Letter Audit Entry Types

I’ve been referring to these two-letter “codes” throughout this article. What if you don’t know what these are for or you don’t know which one to use? Several references exist for these two-letter codes. If you are using the Copy Audit Journal Entry (CPYAUDJRNE) command to get entries out of the audit journal, you specify these two-letter codes to “harvest” the information you’re looking for. CPYAUDJRNE then generates a file—QAUDITxx in library QTEMP—where xx is the two-letter code specified. If you’re unsure of the code, press F1=Help on the Audit journal types field. The help text provides a short description of each two-letter code. These descriptions are also available in Appendix F, after the description of the header fields. But if you’re still lost or need more detail, look in Chapter 9 of the Security Reference manual. Table 133 provides the mapping between what’s specified in the QAUDLVL (action auditing) system value and the codes that can be generated by specifying each. For example, the table shows that, if you specify *CREATE as one of the values for QAUDLVL, you could have AU, CO, DI, and XD entries.

Summary

So much information in the audit journal is never utilized. I hope this gives you a better understanding of what’s available so you can make full use of this information.

Carol Woodbury

 

Carol Woodbury is President and CTO of DXR Security and has over 30 years’ experience with IBM i Security. She started her career as Security Team Leader and Chief Engineering Manager for iSeries Security at IBM in Rochester, MN. Since leaving IBM, she has co-founded two companies – SkyView Partners and DXR Security. Her current company - DXR Security - specializes in penetration testing for IBM i. Her practical experience together with her intimate knowledge of the system combine for a unique viewpoint and experience level that cannot be matched.

Carol is known world-wide as an author and award-winning speaker on security technology, specializing in IBM i Security topics. She has written seven books on IBM i Security. Carol has been named an IBM Champion since 2018 and holds her CISSP and CRISC security certifications.

 


MC Press books written by Carol Woodbury available now on the MC Press Bookstore.

IBM i Security Administration and Compliance: Third Edition IBM i Security Administration and Compliance: Third Edition
Don't miss the newest edition by the industry’s #1 IBM i security expert.
List Price $71.95

Now On Sale

IBM i Security Administration and Compliance: Second Edition IBM i Security Administration and Compliance: Second Edition
Get the must-have guide by the industry’s #1 security authority.
List Price $71.95

Now On Sale

IBM i Security Administration and Compliance IBM i Security Administration and Compliance
For beginners to veterans, this is the definitive security resource.
List Price $69.95

Now On Sale

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$0.00 Raised:
$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: