Commit graph

237 commits

Author SHA1 Message Date
rainmurk
d5f56e5fa0 Fix local SDK breakpoint PID resolution and reject zero CR3 2026-10-18 10:35:16 +08:00
Max Raulea
cccd36c33b accept device and socket paths in .debug on Linux 2026-10-04 21:46:13 +02:00
Claude
578abcbeba Stop malformed command arguments from aborting the debugger
The remaining std::stoi() call sites in the user-mode helpers throw on
malformed and out-of-range input. None of the callers catch, and there is
no top-level handler, so a bad command argument terminates the process
instead of being rejected with an error message.

common/common.cpp:

- IsNumber() tested against the character set "[0123456789]", so the two
  square brackets were accepted as digits. It is used as the guard in
  front of stoi() by several callers, which turns the mistake into a
  crash: "[1]" passes validation and then throws std::invalid_argument.
  Removed the brackets from the set.

- ValidateIP() called stoi() on every octet. Together with the above,
  ".connect [1].2.3.4 50000" aborted the process; so did an octet long
  enough to overflow int, e.g. ".connect 99999999999.1.1.1". Replaced by
  a strtoul() range check, which saturates instead of throwing.

- CheckAddressCanonicality() compared with a strict "<" against the start
  of the higher-half canonical range, so the boundary address itself
  (0xFFFF800000000000 at a 48-bit VA width) was reported as user-mode.
  CheckAccessValidityAndSafety() would then probe a kernel address from
  user mode rather than refusing it.

- ListDirectory() called FindNextFileA() before consuming the match that
  FindFirstFileA() had already stored in FindData, so the first file of
  every listing was silently dropped. Turned into a do/while.

- isxdigit()/isdigit()/isspace() were handed a plain char; passing a
  negative value to the <ctype.h> functions is undefined behavior and
  trips the MSVC debug CRT on any input with a byte above 0x7f. Cast to
  UCHAR at the four call sites.

The same crash class at the call sites that use stoi() directly on user
input, all replaced with strtoul() so the existing range checks reject
the value instead of an exception escaping:

- connect.cpp (x2) and listen.cpp: TCP port validation.
- debug.cpp: serial baud rate.

Verified by extracting the affected functions from common.cpp and running
them under ASan/UBSan over a 316-probe corpus, before and after. The
baseline aborts with SIGABRT on three inputs; afterwards every probe
returns a defined result and exactly the seven intended lines differ.
The four modified files were also compiled with the project's own Linux
CMake build to confirm they build clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W3C1DuhHtqK64eEkHjKCHM
2026-10-04 21:46:13 +02:00
sina
b7a05585c0 cleanup uout and interpreter commands
Some checks are pending
vs2026-ci / win-amd64-build (debug, x64) (push) Waiting to run
vs2026-ci / win-amd64-build (release, x64) (push) Waiting to run
vs2026-ci / Deploy release (push) Blocked by required conditions
2026-09-15 18:17:36 +02:00
sina
9e415a8ce5 change results of the io in and io out commands 2026-09-15 14:05:36 +02:00
sina
434a539868 change help messages of uin and uout commands 2026-09-15 13:59:46 +02:00
FallinBinary
dfe1e53569 Update command help menu 2026-08-29 03:36:32 -07:00
FallinBinary
a52aa35986 Add dps command 2026-08-29 03:25:53 -07:00
FallinBinary
7193b95c86 Add dqs command 2026-08-29 03:19:00 -07:00
FallinBinary
7c0d9eaa1a Add dds command 2026-08-29 03:06:55 -07:00
Sina Karvandi
fd8b9d8bc3
Merge pull request #676 from FallinBinary/dev
Some checks failed
vs2026-ci / win-amd64-build (debug, x64) (push) Has been cancelled
vs2026-ci / win-amd64-build (release, x64) (push) Has been cancelled
vs2026-ci / Deploy release (push) Has been cancelled
refactor dl, da and dw commands
2026-08-15 22:36:49 +02:00
FallinBinary
a78b0208e4 refactor dl, da and dw commands 2026-08-14 08:52:06 -07:00
xmaple555
c40f57efa6 update function parameter to the script engine 2026-08-14 21:40:42 +08:00
xmaple555
d8e777cd39 update test script-semantic 2026-08-12 23:01:07 +08:00
xmaple555
d53712638c revert hyperdbg-test 2026-08-11 00:23:02 +08:00
xmaple555
5fc25f10e5 add the test script-semantic CLI command 2026-08-10 23:47:40 +08:00
Sina Karvandi
80f224fa58
Merge pull request #671 from nikzad66/uin-uout-commands
Some checks failed
vs2026-ci / win-amd64-build (debug, x64) (push) Has been cancelled
vs2026-ci / win-amd64-build (release, x64) (push) Has been cancelled
vs2026-ci / Deploy release (push) Has been cancelled
Uin uout commands
2026-08-10 12:00:21 +02:00
sina
ffa170a964 add return for uin, uout, ucpuid exported functions 2026-08-09 21:13:11 +02:00
sina
3f0e70c575 move ucpuid, uin, and uout files 2026-08-09 20:52:41 +02:00
sina
c8a209d84b add different DW DA definition
Some checks are pending
vs2026-ci / win-amd64-build (debug, x64) (push) Waiting to run
vs2026-ci / win-amd64-build (release, x64) (push) Waiting to run
vs2026-ci / Deploy release (push) Blocked by required conditions
2026-08-08 16:38:16 +02:00
Abolfazl
056559c0ac
Merge branch 'HyperDbg:dev' into dev 2026-08-01 21:03:50 -07:00
FallinBinary
92a8b5256b add da command 2026-08-01 21:01:47 -07:00
sina
a24c8c0a91 cleanup for resync serial codes and update CHANGELOG.md
Some checks are pending
vs2026-ci / win-amd64-build (debug, x64) (push) Waiting to run
vs2026-ci / win-amd64-build (release, x64) (push) Waiting to run
vs2026-ci / Deploy release (push) Blocked by required conditions
2026-08-01 20:49:02 +02:00
FallinBinary
1f50e5afe8 add dw command 2026-08-01 08:31:13 -07:00
Max Raulea
1a9a62a916 Forgot to add the new linux stubs to tracked files, so here it is 2026-07-24 22:10:08 +02:00
Max Raulea
7ea5eb6f2b gcc enum init fix {0} -> {} 2026-07-24 19:36:31 +02:00
Sina Karvandi
8e1288949b
Merge pull request #657 from HyperDbg/linux
Linux
2026-07-23 15:44:56 +02:00
sina
7911465b93 cleanup ucpuid command codes 2026-07-23 10:03:35 +02:00
Max Raulea
6f7bc287fe Guards and Documentation 2026-07-22 10:16:22 +02:00
Max Raulea
5fdd2e7738 rdmsr file and updates status 2026-07-22 10:02:29 +02:00
Max Raulea
a4da625e05 fix build
Some checks are pending
vs2026-ci / win-amd64-build (debug, x64) (push) Waiting to run
vs2026-ci / win-amd64-build (release, x64) (push) Waiting to run
vs2026-ci / Deploy release (push) Blocked by required conditions
2026-07-21 15:57:23 +02:00
Max Raulea
926070135d Sweeps and extra guards and some new platform functionsd 2026-07-21 15:53:34 +02:00
Sina Karvandi
fe9a6f39e4
Merge pull request #654 from HyperDbg/linux
Some checks failed
vs2026-ci / win-amd64-build (debug, x64) (push) Has been cancelled
vs2026-ci / win-amd64-build (release, x64) (push) Has been cancelled
vs2026-ci / Deploy release (push) Has been cancelled
Linux
2026-07-21 14:05:03 +02:00
xmaple555
d44c726dff update variable type and add float type in script enginr 2026-07-20 23:21:34 +08:00
Max Raulea
a29e210ab0 Porting status update and terminate thread platform call
Some checks are pending
vs2026-ci / win-amd64-build (release, x64) (push) Waiting to run
vs2026-ci / win-amd64-build (debug, x64) (push) Waiting to run
vs2026-ci / Deploy release (push) Blocked by required conditions
2026-07-20 12:32:10 +02:00
Max Raulea
bb059c724a Big Sweep of 1:1 platform function changes 2026-07-20 12:27:14 +02:00
Max Raulea
218ade8f24 1:1 platform swaps 2026-07-20 12:15:34 +02:00
Max Raulea
c13f45f8b0 CpuIdEx replacements 2026-07-20 12:12:21 +02:00
Max Raulea
38a59b795f Some new lib calls and reverted sleep macro to function
Some checks are pending
vs2026-ci / win-amd64-build (debug, x64) (push) Waiting to run
vs2026-ci / win-amd64-build (release, x64) (push) Waiting to run
vs2026-ci / Deploy release (push) Blocked by required conditions
2026-07-17 17:54:05 +02:00
sina
01b6f1ca32 fix double enable error and create a new window for suspended process
Some checks failed
vs2026-ci / win-amd64-build (debug, x64) (push) Has been cancelled
vs2026-ci / win-amd64-build (release, x64) (push) Has been cancelled
vs2026-ci / Deploy release (push) Has been cancelled
2026-07-12 18:46:33 +02:00
sina
07630fc05a add PT initialization to a separate thread 2026-07-12 15:16:29 +02:00
sina
00c81606fa add pname to PT 2026-07-12 13:54:47 +02:00
sina
38fbed3754 change constants for the dl command
Some checks failed
vs2026-ci / win-amd64-build (debug, x64) (push) Has been cancelled
vs2026-ci / win-amd64-build (release, x64) (push) Has been cancelled
vs2026-ci / Deploy release (push) Has been cancelled
2026-07-11 22:34:29 +02:00
sina
16b7f014ce update dl command
Some checks are pending
vs2026-ci / win-amd64-build (debug, x64) (push) Waiting to run
vs2026-ci / win-amd64-build (release, x64) (push) Waiting to run
vs2026-ci / Deploy release (push) Blocked by required conditions
2026-07-11 19:59:08 +02:00
FallinBinary
863f95c0e9 add 'dl' command 2026-07-10 07:55:56 -07:00
sina
9f113278ee add comment for run and trace
Some checks failed
vs2026-ci / win-amd64-build (debug, x64) (push) Has been cancelled
vs2026-ci / win-amd64-build (release, x64) (push) Has been cancelled
vs2026-ci / Deploy release (push) Has been cancelled
2026-07-03 18:23:39 +02:00
sina
5739d0ee4c add PT thread helper 2026-07-03 17:26:01 +02:00
sina
16aebb0c5d remove dependency on module details over global variables 2026-07-02 20:40:41 +02:00
sina
43cea334c2 add core and path interpretation of PT 2026-07-02 18:14:47 +02:00
sina
72a8aa325f add user mode PT parameter parser 2026-06-30 20:30:25 +02:00