Skip to content

Instantly share code, notes, and snippets.

View fabriciojoc's full-sized avatar
🎯
Focusing

Fabrício Ceschin fabriciojoc

🎯
Focusing
View GitHub Profile
@fabriciojoc
fabriciojoc / train_classifier.py
Created September 29, 2021 13:24
MLSEC 2021 Model Definition
# This is only a code snippet extracted from
# https://github.com/fabriciojoc/2021-Machine-Learning-Security-Evasion-Competition/blob/master/defender/train_classifier.py
class NeedForSpeedModel():
# numerical attributes
NUMERICAL_ATTRIBUTES = [
'virtual_size', 'has_debug', 'imports', 'exports', 'has_relocations',
'has_resources', 'has_signature', 'has_tls', 'symbols', 'timestamp',
'numberof_sections', 'major_image_version', 'minor_image_version',
'major_linker_version', 'minor_linker_version', 'major_operating_system_version',
@fabriciojoc
fabriciojoc / json_attribute_extractor.py
Last active September 24, 2020 05:30
MLSEC 2020: Need for Speed Malware Detection Model
import json
class JSONAttributeExtractor():
# initialize extractor
def __init__(self, file):
# save data
self.data = json.loads(file)
# attributes
self.attributes = {}
@fabriciojoc
fabriciojoc / features_tfidf_10k.tsv
Last active April 13, 2017 00:36
Brazilian Malwares 10k - TFIDF
We can't make this file beautiful and searchable because it's too large.
BaseOfCode BaseOfData Characteristics DllCharacteristics FileAlignment ImageBase Machine Magic NumberOfRvaAndSizes NumberOfSections NumberOfSymbols PE_TYPE PointerToSymbolTable Size SizeOfCode SizeOfHeaders SizeOfImage SizeOfInitializedData SizeOfOptionalHeader SizeOfUninitializedData TimeDateStamp Entropy identifiers1 identifiers2 identifiers3 identifiers4 identifiers5 identifiers6 identifiers7 identifiers8 identifiers9 identifiers10 identifiers11 identifiers12 identifiers13 identifiers14 identifiers15 identifiers16 identifiers17 identifiers18 identifiers19 identifiers20 identifiers21 identifiers22 identifiers23 identifiers24 identifiers25 identifiers26 identifiers27 identifiers28 identifiers29 identifiers30 identifiers31 identifiers32 identifiers33 identifiers34 identifiers35 identifiers36 identifiers37 identifiers38 identifiers39 identifiers40 identifiers41 identifiers42 identifiers43 identifiers44 identifiers45 identifiers46 identifiers47 identifiers48 identifiers49 identifiers50 identifiers51 identifiers