Skip to content

Commit b8adb56

Browse files
authored
Merge pull request #197 from intelowlproject/develop
v1.7.1
2 parents 3dceba4 + ca14d9a commit b8adb56

File tree

16 files changed

+169
-19
lines changed

16 files changed

+169
-19
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
### the COMPOSE_FILE variable each separated with ':'. If you are on windows, replace all ':' with ';'.
66
### Reference to Docker's official Docs: https://docs.docker.com/compose/reference/envvars/#compose_file#compose_file
77

8-
INTELOWL_TAG_VERSION=v1.7.0
8+
INTELOWL_TAG_VERSION=v1.7.1
99

1010
###### Default (Production) ######
1111

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ license terms.
7474
[APKiD](https://github.com/rednaga/APKiD/blob/master/LICENSE.COMMERCIAL),
7575
[Box-JS](https://github.com/CapacitorSet/box-js/blob/master/LICENSE),
7676
[Capa](https://github.com/fireeye/capa/blob/master/LICENSE.txt),
77-
[Quark-Engine](https://github.com/quark-engine/quark-engine)
77+
[Quark-Engine](https://github.com/quark-engine/quark-engine),
7878
[IntelX](https://intelx.io/terms-of-service)
7979

8080
## Acknowledgments

api_app/admin.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ class CustomOutstandingTokenAdmin(OutstandingTokenAdmin):
5151
(
5252
"Create API Token For",
5353
{
54-
"fields": ("user", "token",),
54+
"fields": (
55+
"user",
56+
"token",
57+
),
5558
"description": f"""
5659
<h3>Token will be auto-generated on save.</h3>
5760
<h5>Please note that this token,</h5>

api_app/models.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ def __str__(self):
3030
class Job(models.Model):
3131
class Meta:
3232
indexes = [
33-
models.Index(fields=["md5", "status",]),
33+
models.Index(
34+
fields=[
35+
"md5",
36+
"status",
37+
]
38+
),
3439
]
3540

3641
source = models.CharField(max_length=50, blank=False, default="none")

api_app/script_analyzers/file_analyzers/vt3_scan.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ def run(self):
4040

4141

4242
def vt_scan_file(
43-
api_key, md5, job_id, rescan_instead=False, max_tries=100, poll_distance=5,
43+
api_key,
44+
md5,
45+
job_id,
46+
rescan_instead=False,
47+
max_tries=100,
48+
poll_distance=5,
4449
):
4550
try:
4651
binary = get_binary(job_id)
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import logging
2+
from XLMMacroDeobfuscator.deobfuscator import process_file
3+
from api_app.script_analyzers.classes import FileAnalyzer
4+
from celery.exceptions import SoftTimeLimitExceeded
5+
6+
logger = logging.getLogger(__name__)
7+
8+
9+
class XlmMacroDeobfuscator(FileAnalyzer):
10+
def set_config(self, additional_config_params):
11+
self.passwords_to_check = [""]
12+
additional_passwords_to_check = additional_config_params.get(
13+
"passwords_to_check", []
14+
)
15+
if isinstance(additional_passwords_to_check, list):
16+
self.passwords_to_check.extend(additional_passwords_to_check)
17+
elif isinstance(additional_passwords_to_check, str):
18+
self.passwords_to_check.append(additional_passwords_to_check)
19+
20+
def run(self):
21+
results = {}
22+
try:
23+
for password in self.passwords_to_check:
24+
results = self.decrypt(password)
25+
if results:
26+
break
27+
if not results:
28+
results["error"] = "Can't decrypt with current passwords"
29+
except SoftTimeLimitExceeded:
30+
self._handle_base_exception("Soft Time Limit Exceeded")
31+
return results
32+
33+
def decrypt(self, xlmpassword=""):
34+
args = {
35+
"file": self.filepath,
36+
"noindent": True,
37+
"nointeractive": True,
38+
"return_deobfuscated": True,
39+
"output_level": 3,
40+
}
41+
if xlmpassword:
42+
args["password"] = xlmpassword
43+
try:
44+
results = {"output": process_file(**args), "correct_password": xlmpassword}
45+
46+
return results
47+
except Exception as e:
48+
if "Failed to decrypt" in str(e):
49+
return {}
50+
return {"errors": str(e)}

api_app/script_analyzers/observable_analyzers/vt3_get.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ def run(self):
3939

4040

4141
def vt_get_report(
42-
api_key, observable_name, obs_clfn, additional_config_params, job_id,
42+
api_key,
43+
observable_name,
44+
obs_clfn,
45+
additional_config_params,
46+
job_id,
4347
):
4448
headers = {"x-apikey": api_key}
4549

configuration/analyzer_config.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@
165165
"text/x-ms-iqy",
166166
"application/excel",
167167
"text/xml",
168-
"application/xml"
168+
"application/xml",
169+
"application/zip"
169170
],
170171
"decription": "static generic document analysis",
171172
"python_module": "docinfo_run"
@@ -938,6 +939,23 @@
938939
"directories_with_rules": ["/opt/deploy/yara/rules"]
939940
}
940941
},
942+
"Xlm_Macro_Deobfuscator": {
943+
"type": "file",
944+
"supported_filetypes": [
945+
"application/vnd.ms-excel.addin.macroEnabled",
946+
"application/x-mspublisher",
947+
"application/vnd.ms-excel",
948+
"application/vnd.ms-excel.sheet.macroEnabled.12",
949+
"application/excel",
950+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
951+
"application/zip"
952+
],
953+
"decription": "Xlm macro deobfuscator",
954+
"python_module": "xlm_deobfuscator_run",
955+
"additional_config_params": {
956+
"passwords_to_check": ["agenzia", "inps", "coronavirus"]
957+
}
958+
},
941959
"Yara_Scan_Florian": {
942960
"type": "file",
943961
"description": "scan a file with Neo23x0 yara rules",

configuration/ldap_config.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
AUTH_LDAP_BIND_DN = "cn=django-agent,dc=example,dc=com"
1212
AUTH_LDAP_BIND_PASSWORD = ""
1313
AUTH_LDAP_USER_SEARCH = LDAPSearch(
14-
"ou=users,dc=example,dc=com", ldap.SCOPE_SUBTREE, "(uid=%(user)s)",
14+
"ou=users,dc=example,dc=com",
15+
ldap.SCOPE_SUBTREE,
16+
"(uid=%(user)s)",
1517
)
1618
# Or:
1719
# AUTH_LDAP_USER_DN_TEMPLATE = 'uid=%(user)s,ou=users,dc=example,dc=com'

docs/source/Contribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ $ flake8 . --show-source --statistics
8383

8484
```bash
8585
$ docker-compose -f docker-compose-for-tests.yml build
86-
$ docker-compose -f docker-compose-for-tests.yml up`
86+
$ docker-compose -f docker-compose-for-tests.yml up
8787
```
8888

8989
3. Here, we simulate the travis CI tests locally by running the following 3 tests,

0 commit comments

Comments
 (0)