Skip to content

feat: add baseline anti-cheat guards - #27

Open
TJCurnutte wants to merge 1 commit into
javelin-anticheat:mainfrom
TJCurnutte:tjcurnutte/bounty-2-baseline-anti-cheat
Open

feat: add baseline anti-cheat guards#27
TJCurnutte wants to merge 1 commit into
javelin-anticheat:mainfrom
TJCurnutte:tjcurnutte/bounty-2-baseline-anti-cheat

Conversation

@TJCurnutte

Copy link
Copy Markdown

Summary

/claim #2

Implements baseline anti-cheat protection for both required runtime paths:

  • rewrites AntiCheat.cpp into a portable, buildable native guard with Windows debugger/process detection and POSIX fallback for local verification
  • adds anti_cheat.py, a dependency-free Python monitor with debugger detection and suspicious process blocking
  • adds regression tests for process normalization, suspicious process detection, debugger-first blocking, clean pass behaviour, and JSON output
  • adds a short demo GIF at docs/javelin-anticheat-demo.gif

Acceptance criteria mapping

  • Application exits when a debugger is detected: implemented in C++ (IsDebuggerPresent, CheckRemoteDebuggerPresent, PEB best-effort on MSVC, POSIX tracer fallback) and Python (sys.gettrace, Win32 IsDebuggerPresent, Linux TracerPid).
  • Application exits when a suspicious process is found: implemented in both C++ and Python using the same conservative known-tool list.
  • Works for both C++ client and Python monitor: both files are included, documented, and locally validated.

Demo

See docs/javelin-anticheat-demo.gif in this PR.

Validation

$ python3 -m unittest discover -s tests
........
----------------------------------------------------------------------
Ran 8 tests in 0.002s

OK

$ c++ -std=c++17 -Wall -Wextra -pedantic AntiCheat.cpp -o /tmp/javelin-anticheat-check
$ /tmp/javelin-anticheat-check
[Javelin AntiCheat] starting checks...
[Javelin AntiCheat] All clear. Continue.

$ git diff --check
# no output

Notes

This was implemented with AI assistance and manually reviewed before submission. I kept the patch scoped to the issue requirements and added tests so reviewers can verify behaviour without attaching a debugger or launching real cheat tools.

Fixes #2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Implement Basic Anti-Cheat Protection

1 participant