04
Fri, Oct
2 New Articles

Security Patrol

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

OS/400 SysReq Security Exposure

Q: I recently read on Securityfocus.com that OS/400 has a security problem that was reported to Bugtraq. According to the report, any user can get a list of all of the user profile objects through the use of the SysReq menu. Do you know anything about this exposure? Can you tell me if I need to be worried about it?

A: It's very unusual for OS/400 issues to appear on the Bugtrac list, so this one caught my eye as well. The essence of the alleged exposure is that a user could use the SysReq menu to display their own job and then, from the DSPJOB menu, choose to display library lists. Once there, the user could display the contents of library QSYS, including the names of user profile objects that they are not otherwise authorized to. (See the Securityfocus report at http://online.securityfocus.com/bid/4059.)

In order to exploit this anomaly, the user must already be signed on to your iSeries and must have access to the SysReq menu. In this case, the user can then see the names of all of your user profiles. This is not desirable, but neither is it a crisis. From my perspective, the security exposure is not so much that a user can see the names of other user profiles; I am more concerned with the larger concept: that a user can see and verify the existence of any object that they are *EXCLUDED from if they simply have *USE authority to the library that those objects live in. If this is not a shortcoming of security, it is at least an inconsistent application of security. If a user issues the command WRKOBJ FRED from a command line, they will not see any object named FRED in their library list if their authority to those objects is *EXCLUDE. Yet, if the same user accesses a "list library" procedure, they will be eligible to see--and verify the existence of--all of the objects (not just user profiles) named FRED in that library, regardless of their authority to those objects.

What this tells me is that you cannot conceal the existence of an object from a user if the object exists in a library the user has *USE authority to. If you have a business reason to conceal the existence of objects from certain users, you'll need to put that object in a library that those users have *EXCLUDE authority to. Of course, this is not possible for user profiles because they all live in library QSYS, and a user must have *USE rights to QSYS to use OS/400. But, as several IBMers have pointed out to me, you can see the same thing on UNIX systems by typing commands such as "cat /etc/passwd | scroll," so they feel that OS/400 is being unfairly singled out for an exposure that UNIX allows.

So is this something to worry about? That depends on how well you manage the user profiles on your system. If you make a regular practice of expiring old profiles, preventing users from using default passwords, and enforcing password rules that make passwords difficult to guess, the impact of this security anomaly will be negligible. But if you are inattentive to the problem of old and unguarded user profiles, then allowing users access to the list of other users could be a serious exposure.

Just last week, I was visiting a business partner to demonstrate our software, and while I was there, the president of the company invited me to try to gain access to their system. While he was quite confident in his security at the start of the session, by the end of the demonstration, there were a lot of embarrassed laughs and sheepish looks being cast sideways among the business partner technicians. My exploit? Simple, really. I acquired a list of user names and then endeavored to try the default passwords for a couple that looked like testing or training profiles. I hit pay dirt on the first try, and in just a few seconds was logged onto the system with a testing profile. In no time at all, I was able to traipse across production applications and download production files.

There are lots of ways to get lists of users on a given system. Having the list is valuable to a hacker only if the underlying user profile security is weak.

To keep user profile security strong, you should perform these OS/400 commands on a regular basis:

  • Use the Analyze Default Passwords (ANZDFTPWD) command to display a list of user profiles whose passwords are the same as the user profile name.
  • Look for old, unused profiles by issuing the Print User Profile (PRTUSRPRF) command and specifying *PWDINFO on the Type parameter. Then scan the "last signed on" date to see which profiles are unused.


In addition, make sure that your password system values are set to require strong passwords. Here are the password system values to pay particular attention to (along with some recommended settings):

  • QPWDEXPITV--Password Expiration Interval
    Maximum 60 days
  • QPWDMINLEN--Password Minimum Length
    Six characters
  • QPWDRQDDGT--Require at least one digit in password
    Yes!
  • QPWDRQDDIF--Require this password to be different from the last N passwords.
    Set it to at least 10.


If you want to tighten up the particular exposure you wrote to me about, you have a couple of different options. The Securityfocus Web site recommends either securing the SysReq panel group itself so that the user cannot access the SysReq menu (Example: RVKOBJAUT OBJ(QSYS/QGMNSYSR) OBJTYPE(*PNLGRP) USER(user-id) AUT(*ALL) ) or securing the DSPLIB command (Example: RVKOBJAUT OBJ(QSYS/DSPLIB) OBJTYPE(*CMD) USER(*PUBLIC) AUT(*ALL) ) so that the user cannot display a library.

Be cautioned, however, that revoking authority to the DSPLIB command is not an effective block to this exposure because the Display Library option on the DSPJOB command does not use the DSPLIB command.

If you're looking for a more strategic method of securing this exposure, consider editing the SysReq message description to eliminate the DSPJOB capability. Message description QSYS/QCPFMSG CPX2313 contains the commands that are executed by the SysReq menu. If you replace the "DSPJOB" string with a string such as "NULLCMD" and then create a command called NULLCMD that does nothing, this would prevent all users from using the SysReq menu to view their jobs (and eventually their library lists).

Keep Users from Adding Files to Libraries

Q: I have a series of production libraries that my users access from both RPG programs and from the Web. I want the users to be able to read and update files in those libraries, but I don't want them to create new files (or other objects) in those libraries. Is there a way to get this done?

A: Actually, this is quite easy, and OS/400 is well-positioned to get the job done. In order to create a file (or any other object) in a library, the user must have Data Add rights to the library object itself. If you perform the EDTOBJAUT authority against the library and then remove the "X" under the ADD column in the object authority screen for the library in question, the user(s) in question will no longer be able to create new objects in the library. Assuming that you do not revoke their ability to "*USE" the library, this change will not affect their ability to work with objects in the library.

A word of caution is in order. Though the absence of the Data Add authority column on a library will prevent a user from adding a new object into a library, the absence of the Data Delete authority column will not prevent a user from deleting an object from a library. In order to delete an object from a library, the user only needs *USE authority to the library (and of course *OBJEXST to the object being deleted). If you want to prevent the deletion of objects, you must secure those objects at the object level and not rely on the library level to protect you.

Clear-Text Passwords

Q: Recently, the owner's son, through the use of some "sniffer" software, was able to capture the userids and passwords of several people as they signed onto the AS400. He was running this software from a PC attached to the same LAN to which the AS400 and all of the users are attached: Windows NT network. If he can do this, so can someone else! How do I prevent this?

A: The problem with clear-text passwords on OS/400 is a well-known flaw in the DDS sign-on screen QDSIGNON. The root of the problem is that DDS is not able to provide, or even recognize, encrypted text. Therefore, any text that is typed into a DDS screen would not be encrypted unless the entire communication session is encrypted through the use of some lower-level encryption technology, such as a VPN.

The obvious solutions are either to encrypt the entire session (using VPN or SSL) or to not require your users to enter passwords in DDS. The second suggestions is not as crazy as it sounds. If you're using IBM Client Access, the Client Access sign-on function (the little blue and gray window) will encrypt profiles and passwords before they are sent to the AS/400. If you configure the Client Access program to Bypass Signon (meaning that the DDS screen is bypassed) and configure the AS/400 system value QRMTSIGN to *VERIFY, then users will only have to sign on at the little window, and passwords will not be sent to DDS in the clear.

From a security perspective, DDS is a mess. I would avoid typing sensitive information into a DDS screen whenever possible.

Capture Unauthorized Access Attempts

Q: I need to be able to tell when someone tries to access a file or a program that they are not authorized to. I have the authority set up correctly on the objects, but I never get any messages. How can I tell if it is working?

A: The Security Audit Journal (QAUDJRN) can record all attempts to access an object without proper authority. To accomplish this, first ensure that the system value QAUDCTL is set to (at least) *AUDLVL and the system value QAUDLVL includes the value *AUTFAIL. Once these settings are in place, the security audit journal will record invalid access attempts in the QAUDJRN receivers. These entries will bear the journal code of "T" and the journal type of "AF." You can either pull these entries out of the journal with a homegrown query or purchase a more sophisticated auditing tool that was built for this task.


John Earl is chief technology officer for the PowerTech Group in Kent, Washington. This month, John's hobby is looking for all of the systems that have default passwords for accounts named GUEST, TEST, and TEST1 through TEST10. If you have a security question or a favorite default profile name, you can send John an email at This email address is being protected from spambots. You need JavaScript enabled to view it. or post it online in the MCPressOnline Security Forum.

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: