Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Vuln-Dev
[Top] [All Lists]

Reverse shell using netcat on AS/400

Subject: Reverse shell using netcat on AS/400
Date: Fri, 1 Apr 2005 00:14:43 +0200
Reverse shell using netcat on AS/400

Overview
------------
Netcat, dubbed the TCP/IP "Swiss Army knife", is a simple Unix utility
which reads and writes data across network connections,
using TCP or UDP protocol. An indispensable tool, netcat stars in network
hacking manuals as one of the most versatile and powerful utilities.

A netcat executable file compiled on AIX can be successfully deployed
on some AS/400 servers.

Details
----------
The AS/400 operating system has an optional feature called
Portable Application Solutions Environment, or in short PASE.

PASE provides an integrated run-time environment for AIX applications
running on AS/400. For many applications, this means that all you have
to do is place the AIX executables in an AS/400 folder, chmod it to
executable
permissions, and run it via the AS/400 PASE shell.
In particular, the netcat utility can be successfully executed, both as
client and as server, including the -e option for reverse shell execution.
No special AS/400 privileges are required for the installation and execution
of netcat, except for the ability to place a file via FTP,
and the ability to CALL a program.

An AS/400 user with some very basic Unix knowledge
can now download netcat to the AS400
by the built-in FTP client, and start using it right away.


Vulnerable systems:
-----------------------
AS/400 servers with PASE installed.
How do you know if your server has PASE? The easiest is to issue this
command:

CALL PGM(QP2TERM)

This program is the PASE shell.
If you get a screen with a command line and with "/QOpenSys/usr/bin/-sh "
on the top, then you have PASE installed.
Alternatively, look for licensed program 5722SS1 option 33.


Workaround:
----------------
Secure the access to PASE: limit permissions to programs QP2TERM,
QP2SHELL, and QP2SHELL2. If you have audit turned on, audit their usage.
In your firewall, add rules restricting unnecessary outgoing connections
from your AS/400 server to the Internet.

References
-------------
http://publib.boulder.ibm.com/iseries/v5r2/ic2924/info/rzalf/rzalfintro.htm

For full details and examples of reverse shells please read the PDF file
found at
http://www.venera.com/downloads.htm

Shalom Carmel



<Prev in Thread] Current Thread [Next in Thread>
  • Reverse shell using netcat on AS/400, Shalom Carmel <=