Improved DGA detection

Before
Accuracy 66%, Precision 86%, Recall 38%

After
Accuracy 71%, Precision 89%, Recall 49%
This commit is contained in:
Luca Deri
2021-03-03 19:30:01 +01:00
parent 49843509e5
commit 0f8a994841
14 changed files with 168 additions and 138 deletions
+10 -3
View File
@@ -39,12 +39,15 @@ void help() {
/* *********************************************** */
extern int ndpi_verbose_dga_detection;
int main(int argc, char **argv) {
FILE *fd;
char buffer[512];
int verbose = 0;
int num_detections = 0;
if(argc != 2) help();
if(argc < 2) help();
fd = fopen(argv[1], "r");
if(fd == NULL) {
@@ -52,7 +55,12 @@ int main(int argc, char **argv) {
exit(0);
}
if(argv[1] != NULL) verbose = 1;
if(argv[2] != NULL) {
verbose = 1;
if(argv[3] != NULL)
ndpi_verbose_dga_detection = 1;
}
if (ndpi_get_api_version() != NDPI_API_VERSION) {
printf("nDPI Library version mismatch: please make sure this code and the nDPI library are in sync\n");
@@ -67,7 +75,6 @@ int main(int argc, char **argv) {
ndpi_set_protocol_detection_bitmask2(ndpi_str, &all);
ndpi_finalize_initialization(ndpi_str);
assert(ndpi_str != NULL);
int num_detections = 0;
while(fgets(buffer, sizeof(buffer), fd) != NULL) {
-4
View File
@@ -33717,8 +33717,6 @@ kicirtug.ru
eolkbcmid.cx
mmn6zi3zdfz8nqhrww.ru
geiqiwob.ru
singles-organizations.sc
rentirondetailcontestfinance.com
hutdkvppdcncx.com
sonicengineer.net
gekawes6wi02.org
@@ -33728,7 +33726,6 @@ vkmtavbovakpffagww.bz
eiyiccuaymmauyqc.org
egimlecwet.com
jstwviptingp.nf
workout-mainly.vn
dominisanctimor.com
cysnsnnsqwckphatu.net
d1x38ulx2x7r4yepis.biz
@@ -33737,7 +33734,6 @@ azyynmud.cc
iqswfjiobzeiv.com
tallsgcpajgmiu.com
kvlfocrimjvk.com
shore-hunger.az
gasto.es
kmbmfbkdmmabanbc.org
hedcynpchaek.pro
Can't render this file because it is too large.