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

Add The Elder Scrolls Online support #2376

Merged
merged 7 commits into from
Apr 10, 2024
Merged

Conversation

0xA50C1A1
Copy link
Contributor

Please sign (check) the below before submitting the Pull Request:

Describe changes:

In favor of The Elder Scrolls Online's 10th anniversary, which it had 4 days ago. This MMORPG is still popular even nowadays.

I'll leave it as a draft for now, because I'm not sure about using memmem(). Although this is a GNU extension from glibc, this function is available in BSD, macOS and musl libc, also it's works pretty fast. But I'm not sure about the MSVC has this function, also it's not in the Linux kernel space, which will cause some issues for @vel21ripn's fork.

@0xA50C1A1 0xA50C1A1 changed the title New app/teso Add The Elder Scrolls Online support Apr 8, 2024
@IvanNardi
Copy link
Collaborator

I you feel brave, you might try to add something like "ndpi_memmem" in ndpi_utils.c based on the implementation that you find in src/lib/third_party/src/libinjection_sqli.c....

@0xA50C1A1
Copy link
Contributor Author

I you feel brave, you might try to add something like "ndpi_memmem" in ndpi_utils.c based on the implementation that you find in src/lib/third_party/src/libinjection_sqli.c....

Yea, it's a good idea and I thought about it, but the problem is that many simple copypasteable implementations have O(n^2) complexity. Well, if use it as in my case (just to find some sequence in the first 100 bytes of payload), then the complexity doesn't matter, but it's not good for something more serious.

@0xA50C1A1
Copy link
Contributor Author

https://github.com/skeeto/scratch/blob/d366cfc9d70b9bf53a432e21a6ce6efeeebecf80/misc/rabin-karp.c#L57-L97

Here is a bit better implementation published under Unlicense, so I guess we can take it.

@0xA50C1A1 0xA50C1A1 marked this pull request as ready for review April 10, 2024 14:03
@IvanNardi
Copy link
Collaborator

@0xA50C1A1, could you add the usual entry into doc/protocols.rst, please?

ndpi_set_bitmask_protocol_detection("TES_Online", ndpi_struct, *id,
NDPI_PROTOCOL_TESO,
ndpi_search_teso,
NDPI_SELECTION_BITMASK_PROTOCOL_TCP_WITH_PAYLOAD_WITHOUT_RETRANSMISSION,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_TCP_WITH_PAYLOAD_WITHOUT_RETRANSMISSION

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NDPI_SELECTION_BITMASK_PROTOCOL_V4_V6_TCP_WITH_PAYLOAD_WITHOUT_RETRANSMISSION

This game doesn’t seem to use IPv6, but I guess nothing bad will happen if I change selection bitmask to V4_V6.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regardless of this specific protocol, generally speaking, it is better to handle ipv6 traffic too, even if right now the server/service is only ipv4, because:

  • it might support ipv6 in the future
  • we might capture the traffic before a NAT64 translation

@0xA50C1A1
Copy link
Contributor Author

@0xA50C1A1, could you add the usual entry into doc/protocols.rst, please?

Yea. For some reason I thought that I had already done it.

doc/protocols.rst Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Apr 10, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Collaborator

@IvanNardi IvanNardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@IvanNardi
Copy link
Collaborator

The error in the fuzzing is always #2258...

@IvanNardi IvanNardi merged commit 9ff4bec into ntop:dev Apr 10, 2024
32 of 33 checks passed
@0xA50C1A1 0xA50C1A1 deleted the new-app/teso branch April 10, 2024 16:17
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

Successfully merging this pull request may close these issues.

2 participants