-
Notifications
You must be signed in to change notification settings - Fork 364
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
GSoC'23 Project: Implement an Interactive GUI for presenting Network-Based Indicators summary #163
GSoC'23 Project: Implement an Interactive GUI for presenting Network-Based Indicators summary #163
Conversation
Closes #164 |
78aa321
to
770a6ee
Compare
…ort_map dict tackles orig_sport overidding in edge cases of subsequent TCP and UDP transmissions with the same proxy_sport
a method to display all NBIs captured in the current fakenet session to the console
Testing Results: Windows test results
Linux test results
|
Testing ResultsAll available tests have been passed for singlehost (Windows and Linux) and multihost (Linux with Windows) in the automated test suite test.py. Singlehost test results - Windows
Singlehost test results - Linux
Multihost test results - Linux with Windows
NoteSome tests are known to fail in certain OS and network mode configuration. I am listing the known failed tests with supporting links below
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few comments. Most of them are for code style changes and wording sentences differently except for the one in TFTP listener.
Thank you and great job, Beleswar!
@3V3RYONE could you give me permissions to push changes to your branch? |
@@ -112,10 +115,20 @@ def __init__(self, ip, port, listener_q, remote_q, config, log): | |||
self.logger = log | |||
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |||
|
|||
def connect(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like us to document (via comments) why there must exist both a run() and a connect() method.
Your astute mentor reminded me that we documented this in our discussion notes:
The ThreadedTCPClientSocket (which is really a thread!) would implement a
connect()
method that the ThreadedTCPRequestHandler object could use to get the source port and then call a Diverter-supplied callback informing the diverter of the mapping between the old source port and the proxy source port.
Maintainers would benefit from seeing this represented in the comments for connect() along with commentary on the run() method indicating the expectation that connect() has already been called.
Idea
Currently, FakeNet-NG displays its output by either printing it to the console or writing it to a log file. However, Malware with a lot of activity can generate long FakeNet logs. To save analysts from having to read or grep long FakeNet logs, this project aims in providing a user-friendly interface for viewing the output of FakeNet-NG in a more organized and detailed manner.
Implementation
We started by identifying the potential attributes contributing to network-based indicators from each listener. We collected NBIs from each listener in a dictionary and passed it to the diverter component through a callback method (
collect_nbi
). The diverter component then assembled NBIs from all listeners into a central dictionary structure, along with additional details such as process information, protocol, destination IP, port, etc. We developed atemplate.html
file containing placeholders for NBIs, CSS, and JS code for the UI. After each FakeNet session termination, this template file is read, and actual NBI values from the session are inserted into the placeholders. The resulting report is saved with a timestamp in the main working directory of FakeNet. Users can open this HTML file in any browser to review the NBI summary.Features
DiverterWrapper
class. This class facilitates controlled access of the diverter to listeners, aligning with object-oriented programming practices. It offers specific methods from the diverter that listeners require access to, without exposing the entire diverter for improved coding practices.Steps to verify
CTRL+C
.