Another Tale Of IBM I (AS/400) Hacking
A user account with a weak password and limited capabilities could still execute commands via the ATTN key and the Remote Command API, and then switch to a privileged profile. This allowed the attacker to gain full control of the IBM i system.
Our next journey takes us into the infrastructure of a bank. One element of the infrastructure was an IBM i (AS/400) server, and the only piece of information we got to conduct the penetration test was its IP address.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the root cause is that the 'limited capabilities' restriction only applies to some protocols (like 5250 and FTP) and can be bypassed via the ATTN key and the Remote Command API, and that user profiles were misconfigured allowing profile swapping.
Impact
The attacker could execute arbitrary commands, switch to a privileged profile, and modify user profile settings, demonstrating full control of the system.
What the attacker needed
Network access to the IBM i server; a user account with a weak password; the account has limited capabilities
The fix
The text does not state a specific fix, but implies that relying on menu security is insufficient and that user profiles should be properly configured to prevent profile swapping and limit command execution across all protocols.
How it was found
- Discover a user account with username equal to password using Hydra.
- Log in via 5250; the initial menu is *SIGNOFF, but the ATTN key still works.
- Use ATTN to select menu option 2 (Work with jobs) and provide additional parameters to issue arbitrary commands.
- Realise the user is limited and cannot run CL commands via 5250.
- Use the Remote Command API on port 8475 to run CL commands and create a bind shell on PASE.
- From PASE, use SQL to find privileged profiles and switch to an *ALLOBJ profile, then modify the limited capabilities setting.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
The report describes breaking into an IBM i server, a type of midrange computer. The attacker found a user account whose password was the same as its username, and although that account was supposed to be restricted to a menu, they used a special key and another network service to run commands. They then switched to a more powerful account and changed its settings to prove full access.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.