Go to the documentation of this file.
70 Flow *f,
const uint8_t flow_flags,
71 void *txv,
const int list_id);
74 static bool DetectTlsJa3SHashValidateCallback(
const Signature *s,
75 const char **sigerror);
76 static int g_tls_ja3s_hash_buffer_id = 0;
110 DetectTlsJa3SHashSetupCallback);
113 DetectTlsJa3SHashValidateCallback);
135 SCLogError(
"rule contains conflicting protocols.");
156 const uint8_t flow_flags,
void *txv,
const int list_id)
176 static bool DetectTlsJa3SHashValidateCallback(
const Signature *s,
177 const char **sigerror)
183 for (; sm != NULL; sm = sm->
next) {
190 *sigerror =
"ja3s.hash should not be used together with "
191 "nocase, since the rule is automatically "
192 "lowercased anyway which makes nocase redundant.";
199 *sigerror =
"Invalid length of the specified JA3S hash (should "
200 "be 32 characters long). This rule will therefore "
216 for (; sm != NULL; sm = sm->
next) {
222 bool changed =
false;
#define DETECT_CONTENT_NOCASE
SSLv[2.0|3.[0|1|2|3]] state structure.
#define SIGMATCH_INFO_STICKY_BUFFER
void DetectTlsJa3SHashRegister(void)
Registration function for keyword: ja3s.hash.
uint8_t DetectEngineInspectBufferGeneric(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, const DetectEngineAppInspectionEngine *engine, const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id)
Do the content inspection & validation for a signature.
SSLStateConnp server_connp
int DetectBufferSetActiveList(DetectEngineCtx *de_ctx, Signature *s, const int list)
void DetectBufferTypeRegisterSetupCallback(const char *name, void(*SetupCallback)(const DetectEngineCtx *, Signature *))
main detection engine ctx
#define SIG_FLAG_TOCLIENT
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
InspectionBuffer * InspectionBufferGet(DetectEngineThreadCtx *det_ctx, const int list_id)
int DetectBufferTypeGetByName(const char *name)
int Ja3IsDisabled(const char *type)
void DetectBufferTypeRegisterValidateCallback(const char *name, bool(*ValidateCallback)(const Signature *, const char **sigerror))
@ DETECT_AL_TLS_JA3S_HASH
int PrefilterGenericMpmRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id)
#define SCLogWarning(...)
Macro used to log WARNING messages.
void DetectAppLayerMpmRegister(const char *name, int direction, int priority, PrefilterRegisterFunc PrefilterRegister, InspectionBufferGetDataPtr GetData, AppProto alproto, int tx_min_progress)
register a MPM engine
void SSLEnableJA3(void)
if not explicitly disabled in config, enable ja3 support
SignatureInitData * init_data
int RunmodeIsUnittests(void)
bool SigMatchSilentErrorEnabled(const DetectEngineCtx *de_ctx, const enum DetectKeywordId id)
void InspectionBufferApplyTransforms(InspectionBuffer *buffer, const DetectEngineTransforms *transforms)
SigTableElmt sigmatch_table[DETECT_TBLSIZE]
SignatureInitDataBuffer * buffers
#define SCLogError(...)
Macro used to log ERROR messages.
void InspectionBufferSetup(DetectEngineThreadCtx *det_ctx, const int list_id, InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len)
setup the buffer with our initial data
a single match condition for a signature
void DetectAppLayerInspectEngineRegister(const char *name, AppProto alproto, uint32_t dir, int progress, InspectEngineFuncPtr Callback, InspectionBufferGetDataPtr GetData)
register inspect engine at start up time
SpmGlobalThreadCtx * spm_global_thread_ctx
void DetectBufferTypeSetDescriptionByName(const char *name, const char *desc)
void SpmDestroyCtx(SpmCtx *ctx)
SpmCtx * SpmInitCtx(const uint8_t *needle, uint16_t needle_len, int nocase, SpmGlobalThreadCtx *global_thread_ctx)