|
|
|
@ -49,11 +49,9 @@ static void DetectKrb5ErrCodeFree (DetectEngineCtx *, void *);
|
|
|
|
static void DetectKrb5ErrCodeRegisterTests (void);
|
|
|
|
static void DetectKrb5ErrCodeRegisterTests (void);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
static int DetectEngineInspectKRB5Generic(ThreadVars *tv,
|
|
|
|
static int DetectEngineInspectKRB5Generic(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
|
|
|
|
DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
|
|
|
|
const struct DetectEngineAppInspectionEngine_ *engine, const Signature *s, Flow *f,
|
|
|
|
const Signature *s, const SigMatchData *smd,
|
|
|
|
uint8_t flags, void *alstate, void *txv, uint64_t tx_id);
|
|
|
|
Flow *f, uint8_t flags, void *alstate,
|
|
|
|
|
|
|
|
void *txv, uint64_t tx_id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static int g_krb5_err_code_list_id = 0;
|
|
|
|
static int g_krb5_err_code_list_id = 0;
|
|
|
|
|
|
|
|
|
|
|
|
@ -74,13 +72,12 @@ void DetectKrb5ErrCodeRegister(void)
|
|
|
|
#ifdef UNITTESTS
|
|
|
|
#ifdef UNITTESTS
|
|
|
|
sigmatch_table[DETECT_AL_KRB5_ERRCODE].RegisterTests = DetectKrb5ErrCodeRegisterTests;
|
|
|
|
sigmatch_table[DETECT_AL_KRB5_ERRCODE].RegisterTests = DetectKrb5ErrCodeRegisterTests;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
DetectAppLayerInspectEngineRegister("krb5_err_code",
|
|
|
|
|
|
|
|
ALPROTO_KRB5, SIG_FLAG_TOSERVER, 0,
|
|
|
|
|
|
|
|
DetectEngineInspectKRB5Generic);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DetectAppLayerInspectEngineRegister("krb5_err_code",
|
|
|
|
DetectAppLayerInspectEngineRegister2("krb5_err_code", ALPROTO_KRB5, SIG_FLAG_TOSERVER, 0,
|
|
|
|
ALPROTO_KRB5, SIG_FLAG_TOCLIENT, 0,
|
|
|
|
DetectEngineInspectKRB5Generic, NULL);
|
|
|
|
DetectEngineInspectKRB5Generic);
|
|
|
|
|
|
|
|
|
|
|
|
DetectAppLayerInspectEngineRegister2("krb5_err_code", ALPROTO_KRB5, SIG_FLAG_TOCLIENT, 0,
|
|
|
|
|
|
|
|
DetectEngineInspectKRB5Generic, NULL);
|
|
|
|
|
|
|
|
|
|
|
|
/* set up the PCRE for keyword parsing */
|
|
|
|
/* set up the PCRE for keyword parsing */
|
|
|
|
DetectSetupParseRegexes(PARSE_REGEX, &parse_regex);
|
|
|
|
DetectSetupParseRegexes(PARSE_REGEX, &parse_regex);
|
|
|
|
@ -89,14 +86,12 @@ void DetectKrb5ErrCodeRegister(void)
|
|
|
|
SCLogDebug("g_krb5_err_code_list_id %d", g_krb5_err_code_list_id);
|
|
|
|
SCLogDebug("g_krb5_err_code_list_id %d", g_krb5_err_code_list_id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int DetectEngineInspectKRB5Generic(ThreadVars *tv,
|
|
|
|
static int DetectEngineInspectKRB5Generic(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
|
|
|
|
DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
|
|
|
|
const struct DetectEngineAppInspectionEngine_ *engine, const Signature *s, Flow *f,
|
|
|
|
const Signature *s, const SigMatchData *smd,
|
|
|
|
uint8_t flags, void *alstate, void *txv, uint64_t tx_id)
|
|
|
|
Flow *f, uint8_t flags, void *alstate,
|
|
|
|
|
|
|
|
void *txv, uint64_t tx_id)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return DetectEngineInspectGenericList(tv, de_ctx, det_ctx, s, smd,
|
|
|
|
return DetectEngineInspectGenericList(
|
|
|
|
f, flags, alstate, txv, tx_id);
|
|
|
|
NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
@ -261,4 +256,4 @@ static void DetectKrb5ErrCodeRegisterTests(void)
|
|
|
|
UtRegisterTest("DetectKrb5ErrCodeSignatureTest01",
|
|
|
|
UtRegisterTest("DetectKrb5ErrCodeSignatureTest01",
|
|
|
|
DetectKrb5ErrCodeSignatureTest01);
|
|
|
|
DetectKrb5ErrCodeSignatureTest01);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif /* UNITTESTS */
|
|
|
|
#endif /* UNITTESTS */
|
|
|
|
|