Giter Club home page Giter Club logo

mainframe-pentest's Introduction

Mainframe Pentest

Mainframe Penetration Testing

The concepts needed to focus on when performing a Mainframe kill chain attack path, consist of the following key understanding areas. The z/OS run together with UNIX as two primary parts of the mainframe operating systems. Main and ultimate target role to obtain for a malicious actor is the attributes = Special and Operations and/or the root level on UNIX.

Key Mainframe Elements

The components below is not extensive list, but a summary and their short descriptions in purpose.

  • SNA: Logical identifier such as terminal getting an ID for routing between connections
  • VTAM: Initial connection screen on 3270 Terminal, functions Logon, Logoff and IBMTEST
  • TSO: The shell of the z/OS, a place to directly execute REXX scripts
  • REXX: scripting language in mainframe z/OS
  • JCL: the batch schedule job engine running commands
  • RACF: security authentication product controlling access, and most elevated permission is the Special and Operations, together most dangerous roles.
  • Virtual Storage: Everything is in memory and data areas
  • APF: is ring 0, and programs that can edit ANY region in memory, malicious actor able to change memory can elevate their access or gain access to sensitive info
  • CISC: Customer control system, like websites, but not. With CECI function can upload JCL
  • UNIX: controls the networking of mainframe, Java, Web, etc.
  • FTP: Allow file transfer access and ability to run JCL in different mode, issuing command: site file=jes

Vulnerability and Exploitation Paths

The points below is possible attack vectors that may be targeted to obtain access to sensitive information or high privilege role.

  1. Scan discover open services and ports (FTP, SSH, 3270, etc.) - (Missing SSH 22!)
  2. FTP 21 TCP port is bridge between zOS and UNIX to enumerate validate credentials, and perform pass spray (Patator) not brute force.
  3. Gain TSO "shell" access that is a multi user shell of the zOS and aim to get account with access to TSO
  4. Run ENUM REXX script determine users with same ID allowing access to another user SSH profile or key
  5. SSH with discovered ssh keys
  6. Inside SSH session use command: tso 'search class(surrogat)' or tsocmd 'search class(surrogat)' to determine permission
  7. Able to run a bind JCL job as another user surrogate to setup bind reverse shell port for bad actor to connect remotely
  8. submit script to job scheduler that run the job and allow the remote connection with different user permissions
  9. list datasets in HLQ, catalogues resources containing data
  10. get copy backup of RACF sensitive database, identify credentials and passwords
  11. Obtain access to Security authentication product, RACF passticket onetime generate passwords for TSC backup account give access to privilege escalation with Special Operations level role.

Mainframe Pentest tools

Sample of tools used to detect vulnerabilities and exploits against mainframes.

Resources, Videos, Links

mainframe

mainframe-pentest's People

Contributors

botesjuan avatar

Stargazers

Constantine Morales avatar AVA avatar Platon avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.