-
Notifications
You must be signed in to change notification settings - Fork 1
Additional Tools & Helper
This script will take the xml results of a nmap scan and convert it into a list of ip/hostname
:service port
pairs which can be used by tools like nuclei.
If a hostname is used instead of an ip address, the script will prefere the hostname over the ip address
Location of the script: /tools/nmap2nuclei-targets.py
Install the requirements manually or use the requirements.txt
which can be found within the /tools
next to the script
python3 -m pip install -r requirements.txt
- create a nmap xml result by using the option
-oX <output file name>
nmap -sSVC -oX scanresult.xml scanme.nmap.org
- use the script by provide the input and output filename
python3 nmap2nuclei-targets.py -i scanresult.xml -o target-list.txt
by using the flag
-v
, the target list will be also printed on the screen.
This ABAP report can be used to enumerate all Remote Function Modules (RFM) in a SAP system. The report will list all RFMs which do not respond with a Authentication error. The source code can be found below. Credits: Joris van de Vis (@kloris)
- Setup a new RFC Destination of
Type 3
in TransactionSM59
with the name ofZ_TEST
. Provide only the port and ip address/hostname of the system to scan but no username/password.
- Create a new ABAP Report using Transaction
SE38
- When it asks to create a
Object Directory entry
you can chooseLocal Object
- Copy the below code and overwrite the existing content in the Window.
- Save and Activate the report
- Return to the intial screen of Transaction
SA38
and execute the program
- Make sure that the previous added RFC destination is selected. The execute the program in the background
- It can take about 1h after the report has finished. The results can be viewed in the spool output via Transaction
SP01
To scan another System, just change the connection information within the RFC destination added previous.
This code is also avail as document within the tools folder in the Container/Repository.
*&---------------------------------------------------------------------*
*& Report ZZ_ENUMERATE_REMOTE_FUNCMODS
*&---------------------------------------------------------------------*
*& Author Joris van de Vis (@kloris)
*&---------------------------------------------------------------------*
REPORT ZZ_ENUMERATE_REMOTE_FUNCMODS.
PARAMETERS: P_RFCDES LIKE RFCDES-RFCDEST DEFAULT 'Z_TEST'. "This is a RFC dest in SM59 pointing to another SAP system with no user/pw in it
TYPES: BEGIN OF T_ITAB,
FUNCNAME LIKE TFDIR-FUNCNAME,
END OF T_ITAB.
DATA: LT_ITAB TYPE TABLE OF T_ITAB,
LS_ITAB LIKE LINE OF LT_ITAB.
* Retreive remote enabled function modules from table TFDIR
SELECT FUNCNAME FROM TFDIR
INTO LS_ITAB
WHERE FMODE = 'R'.
* and put in itab
APPEND LS_ITAB TO LT_ITAB.
ENDSELECT.
* Loop over itab
LOOP AT LT_ITAB INTO LS_ITAB.
* Call remote function in other SAP system and check if it is authenticated or not
CALL FUNCTION LS_ITAB-FUNCNAME DESTINATION P_RFCDES
EXCEPTIONS
OTHERS = 2.
IF SY-SUBRC <> 2.
* Implement suitable error handling here
WRITE: / 'Unauthentcated RFC Enabled Function Module found:', LS_ITAB-FUNCNAME.
ENDIF.
ENDLOOP.