Security Patrol discusses security topics and implementation tips and answers your security questions. I welcome questions, recommendations, and suggestions for security topics you would like discussed in detail. You can submit your correspondence through MC-BBS at 619-931-9909; by E-mail at
-Wayne O. Evans, chief of security
Q: During an audit of our AS/400, one of the findings was the use of default user profiles named in the communications entries. The default user profile in several different communications entries names the user profile OWNPROD. This profile is the owner of production data files and has a password of *NONE. If I change the entries in the communications subsystem QCMN to replace this default user profile with *NONE, jobs from other systems that use DDM or ICF to access data on our system fail.
I do not fully understand how default user profiles work with communications entries. Are default user profiles in communications a security exposure? If so, how can I remove them without causing disruption to our production applications?
A: The default user in the communications entry of a subsystem has three possible values:
*NONE-Security information must be entered. Requests without security information will be rejected.
*SYS-All user-evoked requests require security information. A default user profile will be used for IBM-defined transaction programs.
User Profile-The name of the default user profile used for evoked requests that enter the subsystem through this entry and contain no security information. (This option is a potential security exposure).
If the display of your communications entries in your communications subsystem is similar to that shown in 1, where a default user profile such as OWNPROD is specified, then there is a security exposure.
If the display of your communications entries in your communications subsystem is similar to that shown in Figure 1, where a default user profile such as OWNPROD is specified, then there is a security exposure.
If a default user profile name is specified and the remote system did not provide any security information, the job will start using the default user profile. If the default user profile has authority to production data, as your OWNPROD profile does, the communications job will have full access to production data.
The exposure is that a remote system can start a job on your AS/400 using the default user profile. A hacker can easily exploit the default user profile because there is no password or user profile name required to start a job as the default user.
Correcting this security exposure is the challenge. From a security standpoint, the best solution is to change the communications entries to remove the default user. However, if you do, production applications are likely to fail. The applications that depend upon the default user profile to access production data need to be started using the profile name of the default user. I have two potential solutions:
1. Create an explicit device specification.
2. Remove the default user.
This first solution reduces the security exposure so only specific systems can use the default user profile. The initial subsystem description shown in 1 allows *ANY communications device to start jobs with the default user profile OWNPROD. You can limit the exposure to specific systems by changing the subsystem description to remove the default user profile name for the *ALL devices entry. Next, create a configuration entry with an explicitly named communications device associated with the remote system you want to communicate with and place the user profile name in that entry. 2 illustrates this configuration for two remote systems: SYSTEM1 and SYSTEM2.
This first solution reduces the security exposure so only specific systems can use the default user profile. The initial subsystem description shown in Figure 1 allows *ANY communications device to start jobs with the default user profile OWNPROD. You can limit the exposure to specific systems by changing the subsystem description to remove the default user profile name for the *ALL devices entry. Next, create a configuration entry with an explicitly named communications device associated with the remote system you want to communicate with and place the user profile name in that entry. Figure 2 illustrates this configuration for two remote systems: SYSTEM1 and SYSTEM2.
If you use this option, I recommend the use of a location password (LOC-PWD) for the device descriptions for systems (SYSTEM1 and SYSTEM2) that use the default user profile. The LOCPWD ensures that the communication is with the desired systems.
Before I describe the second solution, I want to explain some details about communications configurations so you understand this solution. The communications configuration on your AS/400 defines the Advanced Program-to-Program Network (APPN) devices that determine which remote systems can connect to your AS/400. Two communications configuration parameters (Secure location and Location password) control the security of remote communications. There are two ways to specify these security parameters. The device description or the remote configuration list specifies the attributes of the communications configuration. For more detail, refer to these commands:
o Change Device APPC
o Create Device APPC (CRTDEVAPPC)
o Add Configuration List Entries
o Change Configuration List Entries (CHGCFGLE)
The Secure location (SECURELOC) parameter determines if your system will accept security information from a remote system. The default value of *NO indicates that your system requires remote systems to supply security information. When *NO is specified for SECURELOC, the remote system must supply both a user profile and a password to start a job on your system or send no security information (blanks as user profile and password). Sending blanks will be accepted only if your system has configured a default user (which we want to avoid). When *YES is specified for the SECURELOC parameter, your system will accept a user profile name and no password from the remote system. Your system "trusts" the remote system to validate the user profile as correct.
The communications experts refer to this support as "already verified." The remote system has already verified the user profile password, so no password is required. You do not want to specify SECURELOC(*YES) for another system unless you are confident about the security implementation at the other system. Specifying SECURELOC(*YES) is reasonable for systems within your own company but should never be specified for systems of outside vendors. Since you are trusting the remote computer, you need to be assured that the system you are communicating with is actually the computer you intend. The second parameter of the device configuration, LOCPWD, validates the remote computer as the system intended. LOCPWD is 1-16 hexadecimal numbers that must be the same at both the local and remote systems, or the communications session will be rejected. If you attach to multiple locations, the LOCPWDs should be unique and random. I recommend that you not record the LOCPWDs. Should you need to reconfigure the system, contact the remote system to assign a new LOCPWD.
You may be wondering why I spent so much time on SECURELOC and how it relates to your problem of removing the default user profile names in your system. The Secure location parameter value of *YES is required to be able to start a communications job from a remote system without sending the password on the communications evoked. The IBM DDM support does not allow you to specify a user profile and password. I will use Secure location in the second method.
The second method to remove the default user in the communications entries is shown in 3.
The second method to remove the default user in the communications entries is shown in Figure 3.
If the communications device description specifies SECURELOC(*YES) and the remote system is running a job as user OWNPROD, the SECURELOC(*YES) allows the job to perform DDM operations using the user profile OWNPROD when the remote system opens a DDM file. Starting jobs using the OWNPROD user profile depends upon two conditions.
1. The device or location description must be created with SECURELOC(*YES).
2. The job at the remote system runs with user profile OWNPROD.
You can change the device description using the CHGDEVAPPC, Change Configuration List (CHGCFGL), or the Work with Configuration Lists (WRKCFGL) command to specify a secure location. Vary off the communications device to change the SECURELOC parameter. Changing SECURELOC is adequate, but I recommend specifying a LOCPWD at the same time. If you specify a LOCPWD, you will need to change the corresponding device description on the remote system.
The job on the remote system should be running with the user profile OWNPROD. The remote system jobs are either batch jobs or interactive sessions. Individual users should sign on with their user profiles, not OWNPROD. The challenge is to change the job prior to doing a communications function. The program SWAP, shown in 4, swaps the OWNPROD profile before opening the DDM or ICF file. You should add the following command to the user's initial program.
The job on the remote system should be running with the user profile OWNPROD. The remote system jobs are either batch jobs or interactive sessions. Individual users should sign on with their user profiles, not OWNPROD. The challenge is to change the job prior to doing a communications function. The program SWAP, shown in Figure 4, swaps the OWNPROD profile before opening the DDM or ICF file. You should add the following command to the user's initial program.
CALL PGM(SWAP) PARM('*OWNER')
You should restrict access to the program SWAP since it changes the job on the remote system to run as user OWNPROD. If the OWNPROD profile can enter commands, you should swap the users back to their original user profiles by specifying the following command prior to allowing any command access.
CALL PGM(SWAP) PARM('*USER')
(For more information about the subject of communications configurations, see Security Patrol, MC, September 1994.)
Figure 1: All Devices with Default User
Figure 2: Specific Devices for Default User
Figure 3: Subsystem Communications Entries with No Default User
Figure 4: CL Program to Swap User Profiles
/*==================================================================*/ /* To compile: */ /* */ /* CRTCLPGM PGM(XXX/SWAP) SRCFILE(XXX/QCLSRC) + */ /* USRPRF(*OWNER) */ /* */ /* CHGOBJOWN OBJ(XXX/SWAP) OBJTYPE(*PGM) + */ /* NEWOWN(QSECOFR) */ /* */ /*==================================================================*/ PGM PARM(&OPTION) DCL VAR(&OPTION) TYPE(*CHAR) LEN(10) DCL VAR(&NEWUSR) TYPE(*CHAR) LEN(10) + VALUE('OWNPROD') DCL VAR(&HANDLE) TYPE(*CHAR) LEN(12) IF COND(&OPTION *NE '*OWNER') THEN(RTVJOBA + USER(&NEWUSR)) CALL PGM(QSYGETPH) PARM(&NEWUSR '*NOPWD' &HANDLE) CALL PGM(QWTSETP) PARM(&HANDLE) CALL PGM(QSYRLSPH) PARM(&HANDLE) ENDPGM