22
Fri, Nov
1 New Articles

Security Patrol: Why Aren't All Systems at Security Level 40 or 50?

IBM i (OS/400, i5/OS)
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times
The thought that all systems aren't running at security level 40 or 50 puzzles me. It's been the default value for quite some time now, yet I continue to encounter systems that are not set at security level 40. I haven't encountered any systems at security level 20 for awhile, but I regularly see and hear about systems at level 30. Why? I'm sure there are others, but these are the reasons that I can think of as to why this continues to be true.

Administrators...
1) don't understand or appreciate the benefits or can't articulate them well enough to get management to invest the time to make the move.
2) don't know how or are scared to make the change.
3) believe their applications won't run at security level 40 or 50.
4) have been told there are performance issues at one of these levels.
5) know it's a problem but don't have the time to investigate the issue.

This column is devoted to addressing these concerns in hopes of getting more systems to security level 40 or 50.

Why Security Level 40 or 50?

Security levels 40 and 50 provide "operating system integrity." This is important because operating system integrity prevents the use of interfaces not approved by IBM. In other words, applications are forced to use APIs or commands to access or manipulate OS/400 objects. At security level 20 and 30, applications can use a pointer to resolve, for example, a database file, and directly manipulate the data. This bypasses any object auditing you may have set on the object and in some rare cases also bypasses some authority checking. Because applications can manipulate data "unnoticed"--that is, no audit record is sent when accessing the data--you cannot ensure the integrity of your system.

For example, an application could be written using C or C++. Suppose a disgruntled programmer writes a program that resolves to the file containing the inventory for a retail operation. He invokes the program, and the inventory values are manipulated slightly--levels of some items are increased, some are decreased. The result? Inventory of the retailer is totally hosed. Items are out of stock even though the database indicates plenty of inventory. Other items sit in huge quantities in the warehouse. Even though there was object auditing set on the inventory file, the devious deed was not audited because the system is running at security level 30. "Well," you counter, "the programmer would have to have authority to update the database, wouldn't he?" Yes, you are correct. He (or she) would have to have sufficient authority. But at security level 20 or 30, this is easy to obtain by using a job description that names a powerful user profile. At security level 20 or 30, a user only needs *USE to use a job description. At security level 40 or 50, a user also needs *USE to any user profile named in the job description.

I cannot emphasize enough the importance of being at security level 40 or 50. Neither the security nor the integrity of your system or your data can be assured at security level 20 or 30. Systems at these levels can easily be exploited and security measures quickly circumvented. I feel so strongly that all systems should be at security level 40 or 50 that I would rather see a system at security level 40 and have all users have *ALLOBJ special authority than to see a system sit at security level 20. (A note of explanation: At security level 20, all users are given *ALLOBJ special authority when they are created.)

How Do I Know if It Is Safe to Move My System to Security Level 40?

Auditing is the answer to this question. You will want to run auditing for long enough to assure that the majority of your applications have been run--for example, over month's end or, better yet, quarter or year end. You are looking for two types of violations: One, applications that are doing something they shouldn't, and two, the use of job descriptions that name user profiles where the user doesn't have authority to the user profile. The steps below tell you what to look for and how.

1. Add the *PGMFAIL value to the QAUDLVL system value. This will allow you to start gathering information to determine if any applications need to change. It is unlikely that applications need to change, but you will want to audit to make sure. Otherwise, if the application is doing something it shouldn't, the application will fail at level 40 or 50, and you will have to change the system value back to the previous value and re-IPL to allow the application to run.

2. Add the *AUTFAIL value to the QAUDLVL system value. This allows you to gather entries for users that use a job description that names a user profile. An audit entry is generated when the user does not have *USE authority to the user profile named in the job description.

3. When you have audited over (at least) month's end, query the audit journal. Both the *PGMFAIL and *AUTFAIL parameters produce "AF" type audit entries. The first letter of the audit entry's specific data determines what type of AF entry it is. Look for the following entries:

  • B--Restricted (blocked) instruction violation
  • C--Object validation failure
  • D--Unsupported interface (domain) violation
  • J--Job description and user profile authorization failure (using a jobd that names a user profile)
  • R--Attempt to access protected area of disk (enhanced hardware storage protection)
  • S--Default sign-on attempt

The type of the entry will determine what action needs to be taken to ensure a successful move to security level 40 or 50. For example, if you see an entry that begins with B, you will know that the program that produced the entry is using a blocked MI instruction. The MI instruction will need to be replaced with either a command or an API call. All J entries indicate the use of a job description that names a user profile where the user of the job description does not have *USE authority to the user profile.

There are a couple of ways to query the audit journal. One is to use the Display Journal (DSPJRN) command. You would probably want to use this command if you intend to send the information to an outfile and run your own queries against it. If you just want a printed report, you can use the Display Audit Journal Entry (DSPAUDJRNE) command, specifying AF for the Entry type parameter.

Details about OS/400 auditing can be found in either the iSeries Security Reference or the book Implementing AS/400 Security.

My Third-Party Application Causes Violations

Sometimes, you will get audit journal entries flagging third-party applications. When security level 40 was introduced (in V1R3), many applications could not run at that level, but that is no longer the case. Today, it is rare to find an application that doesn't run at security level 40. However, some applications can be misleading. If you have audited as described above and found violations caused by a third-party application, don't assume that the application doesn't run at security level 40 or 50. When this happens, it's usually because the vendor takes one code path at security level 20 and 30 and another code path (one does not cause violations) at security level 40 and 50. You will see the audit entry at a lower security level, but when you move to the higher level, the application works just fine. To make sure, call the vendor before moving to the higher security level. In addition, some vendors claim that their application doesn't run at security level 50. It is highly likely that it really does run at level 50, but the vendor probably hasn't taken the time to test at that level.

We Can't Afford the Performance Hit

Rest easy. There isn't a performance hit at the higher security levels. In theory, there could have been a performance hit at security level 50 in releases prior to V5R2. However, it was never proven, and to my knowledge, no performance complaints were ever attributed to someone running at security level 50. Vendors may claim a performance advantage at security level 20 or 30, but, again, I have yet to see proof of these claims. Vendors typically fail to consider the extra processing done by the system at the lower security levels to process and "swallow" the exceptions their applications generate by using the unapproved interfaces. So while their code path may seem longer at the higher security levels, the system doesn't have to spend time processing any exceptions.

Security Level 40 or 50?

People often ask me about the differences between security level 40 and 50. Prior to V5R2, the primary difference was something called "parameter validation." Parameter validation makes sure that the pointers passed by user-written programs point to the right type of storage. It has been shown that when parameter validation is not performed, a user-written program calling an API can get back internal system information that is not retrievable when parameter validation is performed. That is why, prior to V5R2, my recommended security level setting is 50. But as of V5R2, parameter validation is now in effect at security level 40 as well as 50. (Kudos to the folks in Rochester for making this possible.) Since parameter validation was the primary reason for my level 50 recommendation, my recommended setting for QSECURITY is now 40 as of V5R2. Details on the exact differences between the two security levels can be found in Chapter 2 of the OS/400 Security Reference manual or in Chapter 2 of my book, Implementing AS/400 Security.

We Don't Have the Time!

There's not a lot I can do about this issue. I can't magically add an hour or two to everyone's day. However, I find that when many people say they don't have the time, it is often because they don't have any idea how to address the particular issue or where to start, so they don't know how much time the effort will take. Therefore, they don't have the time. Hopefully, the information in this column has clarified the benefits of moving to security level 40 or 50, explained how to get the information required, and given you an idea of where to start. Perhaps, after reading this column, time will no longer stand in your way of making the move to security level 40 or 50.

If you would like to submit a question or topic for possible inclusion in a future "Security Patrol," please send it to This email address is being protected from spambots. You need JavaScript enabled to view it.. Make sure to put "Security Patrol Question" in the Subject line.

Carol Woodbury is co-author of the book Implementing AS/400 Security as well as co-founder of SkyView Partners, a firm specializing in security consulting and services. Carol has over 13 years in the security industry, 10 of those working for IBM's Enterprise Server Group as the AS/400 Security Architect and Chief Engineering Manager of Security Technology. Carol can be reached at This email address is being protected from spambots. You need JavaScript enabled to view it..


Carol Woodbury

 

Carol Woodbury is IBM i Security SME and Senior Advisor to Kisco Systems, a firm focused on providing IBM i security solutions. Carol has over 30 years’ experience with IBM i security, starting 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 practical experience and her intimate knowledge of the system combine for a unique viewpoint and experience level that cannot be matched.

Carol is known worldwide 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, including her two current books, IBM i Security Administration and Compliance, 3rd Edition and Mastering IBM i Security, A Modern, Step-by-Step Approach. 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
Don't miss the newest edition by the industry’s #1 IBM i security expert.
List Price $71.95

Now On Sale

Mastering IBM i Security Mastering IBM i Security
Get the must-have guide by the industry’s #1 security authority.
List Price $49.95

Now On Sale

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

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: