Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknow IP can let mhn web crash #799

Open
FreddyMa1210 opened this issue Nov 23, 2020 · 1 comment
Open

Unknow IP can let mhn web crash #799

FreddyMa1210 opened this issue Nov 23, 2020 · 1 comment

Comments

@FreddyMa1210
Copy link

At one day, my MHN Web page can not open but all service is well . So I try to find the reason and this is the reason as following.
If there is one IP address not in "GeoLite2-City.mmdb", then the ISO country code will return "None". When the code is "None", then the MHN Web can not generate icon path and the system will be crashed.
Crash page

Code: "mhn/server/mhn/ui/utils.py"
Bug Code
At function "_get_flag_ip_localdb" in line 61 if it work it can get IP ISO Code, but if IP has no record in "GeoLite2-City.mmdb" it will return None.
Next, line 67 can not use "upper function" to the IP ISO code. If the page need to show the country icon (Like Dashboard, Attack List...etc), then the page will be crashed.

There is the crash log in "/var/log/mhn/mhn-uwsgi.err".
Crash Log
My case "IP 35[.]204[.]67[.]211" has no record in "GeoLite2-City.mmdb" (MD5: fd258548621120622e757631ef94f2cb).

So, I insert an "if" statement in "_get_flag_ip_localdb" to fix it.
Fix Code

Now there will log the error in "/var/log/mhn/mhn-uwsgi.err" and page can show perfectly.
Fix Done 1
Fix Done 2

So if use a special IP address to connect honeypot, then it can do the "DoS attack" to MHN system.

@NicoleG25
Copy link

Hi @d1str0, do you happen to know if this issue was ever addressed? please note that it was assigned CVE-2020-29069

Thanks in advance !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants