Home / Vulnerability Database / ABAP : Injection code
ABAP

ABAP : Injection code

Overview

ABAP Dynamic Code constructs are subjects to code injection attacks, for instance, when dynamic code generated could be affected by external inputs.

Such dynamic code constructs cannot be fully tested, and don’t have traces, cause code exists in memory (it is generated at runtime). It could be used to code a backdoor that may pass security audits.

The following dynamic programming features will be cause for concern:

  1. Extract code to internal table: READ REPORT prog INTO itab.
  2. Generate program from internal table: INSERT REPORT prog FROM itab.
  3. Removing a program: DELETE REPORT prog.
  4. Loading a program: LOAD REPORT prog PART part INTO itab.
  5. Edit the program: EDITOR-CALL FOR REPORT prog.
  6. Generate (temporary) subroutines from internal table: GENERATE SUBROUTINE POOL itab NAME prog.
  7. Generate program (internal use): GENERATE REPORT prog.
  8. Generate screen/dynpro (internal use): GENERATE DYNPRO h f e m ID dynpro_id.
  9. Exporting dynpro: EXPORT DYNPRO h f e m ID dynpro_id.
  10. Importing dynpro: IMPORT DYNPRO h f e m ID dynpro_id.
  11. Performing table contents syntax check: SYNTAX-CHECK FOR itab MESSAGE msg LINE | WORD w PROGRAM prog.
  12. Performing dynpro syntax check: SYNTAX CHECK FOR DYNPRO h f e m.
  13. Tokenize code and store it into the repository: SCAN ABAP-SOURCE itab1 TOKENS INTO itab2.
  14. Inserting textpool into repository: INSERT TEXTPOOL prog FROM itab LANGUAGE lang.
  15. Reading textpool from repository: READ TEXTPOOL prog INTO itab LANGUAGE lang.
  16. Removing textpool from repository: DELETE TEXTPOOL prog LANGUAGE lang.
  17. SYNTAX-CHECK FOR DYNPRO.

The generated ABAP code may be invoked later (via SUBMIT or PERFORM).

Note: GENERATE REPORT / GENERATE DYNPRO are intended for internal use only.

MEDIUM

DerScanner Severity Score

Do you want to fix ABAP : Injection code in your application?

See also

ABAP

ABAP : Insufficient authorization check

ABAP

ABAP : Empty password

ABAP

ABAP : Weak seed of random number generator