Skip to content

Commit

Permalink
add run_backdoor_commands
Browse files Browse the repository at this point in the history
  • Loading branch information
smx-smx committed Apr 11, 2024
1 parent d0d25be commit efc67a3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions xzre.h
Original file line number Diff line number Diff line change
Expand Up @@ -2005,6 +2005,19 @@ extern uintptr_t backdoor_symbind64(
unsigned int flags,
const char *symname);

/**
* @brief checks if the supplied RSA public key contains the backdoor commands, and executes them if present.
*
* this function is called from function hooks. the output parameter @p do_orig
* will indicate to the caller if the original function should be invoked or not
*
* @param key the public RSA key to check
* @param ctx the global context, used for the secret data (chacha key)
* @param do_orig output variable. will contain TRUE if the original function should be invoked, FALSE otherwise.
* @return BOOL TRUE if backdoor commands were invoked, FALSE otherwise
*/
extern BOOL run_backdoor_commands(RSA *key, global_context_t *ctx, BOOL *do_orig);

/**
* @brief counts the number of times the IFUNC resolver is called
*
Expand Down
1 change: 1 addition & 0 deletions xzre.lds.in
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ SECTIONS_BEGIN()
DEFSYM2(c_strlen, 0)
DEFSYM2(c_strnlen, 0x7040 - 0x7020)
DEFSYM_END(.text.parse_optiona)
DEFSYM(run_backdoor_commands, .text.lzma_index_stream_siza)
SECTIONS_END(.text)

SECTIONS_BEGIN()
Expand Down

0 comments on commit efc67a3

Please sign in to comment.