Skip to content

RFC Gateway Service + Python 3 Migration#11

Open
randomstr1ng wants to merge 24 commits into
OWASP:masterfrom
randomstr1ng:rfc-gateway
Open

RFC Gateway Service + Python 3 Migration#11
randomstr1ng wants to merge 24 commits into
OWASP:masterfrom
randomstr1ng:rfc-gateway

Conversation

@randomstr1ng

Copy link
Copy Markdown
Collaborator

This PR adds an RFC Gateway honeypot service and migrates the codebase to Python 3.

RFC Gateway (new)

  • Full RFC gateway implementation that emulates an SAP application server gateway
  • Handles login handshakes, FM/RFM calls, and system info requests
  • Extracts and descrambles credentials from CPIC login traffic
  • Captures multi stage attacks by simulating FM & RFM behaviour
  • Ships with bundled DDIC and RFM catalogs

Other changes

  • Python 3 migration across the entire codebase
  • Message Server: better alignment with pysap, improved logging
  • SAPRouter: bug fixes
  • Docker and CI pipeline updates
  • Docs for Gateway, ICM, and Message Server services

Before leaving draft status:

  • Check & validate CI Pipeline
  • Check and Validate Docker Images
  • Merge RFC additions (and others) into pysap project from local fork!

@DaCodah

DaCodah commented Jun 23, 2026

Copy link
Copy Markdown

Hi @randomstr1ng, really like where this PR is going. The Python 3 migration and the new RFC gateway are great additions. I pulled your rfc-gateway branch locally to help validate the CI item on your todo list, and wanted to share what I found.

1. One leftover six import blocks the test suite. tests/services/saprouter_test.py still has from six.moves import range, but six was (correctly) dropped from requirements.txt during the migration, so pytest fails at collection with ModuleNotFoundError: No module named 'six'. In Python 3 the line isn't needed at all, since the built-in range covers the one usage in that file. Removing it gets the suite to 32 passed locally.

2. The PR isn't buildable from outside without pysap-dev. requirements.txt pins pysap>=0.1.20.dev0, which isn't on PyPI (only up to 0.1.19 is published). I found it lives in your pysap-dev fork (0.2.0.dev0) and installing from there works, but anyone trying the PR fresh will hit a hard wall here. This lines up with your "merge RFC additions into pysap" todo, just flagging how it currently affects reproducibility.

3. Minor: newer pytest emits PytestReturnNotNoneWarning for the test_suite functions that return a TestSuite instead of using assert. Not blocking anything, just noise, and clearly out of scope here.

Happy to send the six fix as a small PR against your rfc-gateway branch if that's useful, or just leave it here for you to fold in. Whatever works best for you. Either way, nice work on this.

@randomstr1ng

Copy link
Copy Markdown
Collaborator Author

submitted the PR to pysap to add required modules and functions: OWASP/pysap#93

@randomstr1ng randomstr1ng marked this pull request as ready for review July 1, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants