1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-08-05 13:25:39 +00:00
Commit Graph

10350 Commits

Author SHA1 Message Date
Gabriele Gristina
d9dfc6da3a
Fixed bug in 34000 with Metal and OpenCL on Apple 2025-07-29 18:09:23 +02:00
Jens Steube
def66c2098
Merge pull request #4005 from ventaquil/code-cleanup-virtualbox
VirtualBox tool code cleanup
2025-07-29 07:32:58 +02:00
Jens Steube
db7b6c661c Fix multi-m and multi-p detection in Argon2, part 2, also allow max 1024 kernel-accel 2025-07-28 11:30:14 +02:00
Jens Steube
4029c50a8f Fix multi-m and multi-p detection in Argon2 2025-07-28 08:57:58 +02:00
Jens Steube
e3ca408f27
Merge pull request #4366 from matrix/adjustments_pre_v7_p2
Adjustments pre v7 (part 2)
2025-07-28 08:46:56 +02:00
Gabriele Gristina
7ea9acaefd
Added option --allow-self-tests to perform also self-test with test_edge.sh 2025-07-28 03:09:03 +02:00
Gabriele Gristina
2858f53ce7
Adding missing explicit address space qualifier into MurmurHash2 kernels to support Metal 2025-07-27 23:59:06 +02:00
Gabriele Gristina
2507447006
fix folder_config build warning, rename hc_clCreateBuffer_pre to hc_clCreateBuffer_ext 2025-07-27 23:34:42 +02:00
hashcat-bot
bfb0d04d4e
Merge pull request #4364 from matrix/adjustments_pre_v7
Updated OpenCL/Metal backends, memory functions, backend and brigde
2025-07-27 23:23:41 +02:00
hashcat-bot
d43da671f8
Merge branch 'master' into adjustments_pre_v7 2025-07-27 23:23:28 +02:00
hashcat-bot
9faa598406
Merge pull request #4365 from matrix/edge_argument_vectors
Allow also a list of vectors widths in test_edge.sh
2025-07-27 23:21:18 +02:00
hashcat-bot
5308e5fc92
Merge pull request #4362 from matrix/update_benchmark_deep
Updated benchmark_deep.pl
2025-07-27 23:19:25 +02:00
github-actions[bot]
e9bc14b639 Automatically updated docs/hashcat-help.md or docs/hashcat-example_hashes.md (by Github Action) 2025-07-27 21:15:14 +00:00
Jens Steube
144b48ac87
Merge pull request #4354 from qasikfwn/master
Add hash modes: MurmurHash2 64A variants
2025-07-27 23:13:50 +02:00
Gabriele Gristina
3151e1dcbb
Allow also a list of vectors widths in test_edge.sh 2025-07-27 21:54:30 +02:00
Gabriele Gristina
2825b33850
add missing cygwin/msys checks on memory.c 2025-07-27 18:02:08 +02:00
Gabriele Gristina
4bd51961e0
rename _WIN32 macro to _WIN in memory.c 2025-07-27 17:26:45 +02:00
Gabriele Gristina
4576e6d446
Updated OpenCL/Metal backends, memory functions, backend and brigde
## OpenCL Backend

- added hc_clCreateBuffer wrapper, hc_clCreateBuffer_pre
- updated HC_OCL_CREATEBUFFER macro
- updated other two hc_clEnqueueWriteBuffer from CL_FALSE to CL_TRUE

## Metal Backend

- added hc_mtlFinish
- updated hc_mtlCreateBuffer

## Memory

- added hc_alloc_aligned and hc_free_aligned
- renamed hcmalloc_aligned and hcfree_aligned to hcmalloc_bridge_aligned and hcfree_bridge_aligned

## Backend & Bridge

- updated references of hcmalloc_aligned and hcfree_aligned to the new memory defined functions
2025-07-27 17:15:44 +02:00
Gabriele Gristina
1e622b1655
Updated benchmark_deep.pl
- Added OS detection to allow conditional execution of platform-specific initialization steps
- Implemented macOS-specific cache cleaning to ensure consistent benchmark results
- Updated script logic to align with other test suites, including improved handling of workdir setup and execution timing measurements
2025-07-27 11:29:52 +02:00
Jens Steube
2d4f648ac3 Update driver requirements to v7 base in readme.txt
Update driver version checks to v7 base in code
Rename rules/top10_2023.rule -> rules/top10_2025.rule
Fix Bitlocker new minimum password length in unit test
2025-07-27 10:18:32 +02:00
qasikfwn
a0f6690945 Update modules, unit tests, optimized kernels to accept pw len up to 64 2025-07-27 14:52:31 +10:00
Jens Steube
0b83cc1ea2 Add new feedback macro FORCED_THREAD_COUNT and Argon2 optimization
Plugin developers can now use the FORCED_THREAD_COUNT macro to enforce
a thread count based on kernel logic and report it back to the host
from module_jit_build_options().

This works similarly to FIXED_LOCAL_SIZE, but with an important
difference: FIXED_LOCAL_SIZE also affects the JIT compiler by setting
a runtime-specific attribute that allows it to optimize for the fixed
thread size. FORCED_THREAD_COUNT does not trigger that behavior.

The downside of FORCED_THREAD_COUNT is that it disables use of
multi-dimensional JIT-optimized kernels. This means we cannot use it
for kernels like Argon2.

However, we still need to dynamically enforce a thread size for Argon2,
because the Argon2 implementation assumes 32 threads for GPUs
and 1 for CPUs. This conflicts with GPUs whose native thread size
is not 32, such as Intel discrete GPUs where the native size is 8.

Also added a case-specific optimization for Argon2. When all hashes
share the same parallelism configuration and/or the same memory size
per password candidate, we can hardcode those values. This is similar
to how we optimize our scrypt kernels and allows the compiler to make
better unrolling decisions.
2025-07-26 11:42:51 +02:00
Jens Steube
9d79fce8fe Fix RC4 primitives bug on GPUs with thread size != 32
Fixed a bug in the RC4 crypto primitives that can cause false
negatives on GPUs which do not result in a thread size of 32 in
module_jit_build_options(). This typically affects Intel GPUs
since those often have a native thread size of 8, but not NVIDIA
or AMD.

The problem was in the key lookup logic in inc_cipher_rc4.cl. It was
written in a way that assumes 32 threads are always running:

If the kernel is launched with only 8 threads, this macro can result
in out-of-bound reads and writes.

To fix this, we now enforce that all kernels using the RC4 primitives
are launched with 32 threads (on GPUs).

The following hash modes were updated to include this fix:

7500, 9700, 9710, 9720, 9800, 9810, 9820, 10400, 10410, 10420, 10500,
10510, 13100, 18200, 25400, 33500, 33501, and 33502.
2025-07-26 10:38:45 +02:00
Jens Steube
d536d6e832 Fixed out-of-boundary read in hash-mode 30601 2025-07-26 10:21:12 +02:00
Jens Steube
44c182494c Add initial hwmon support for discrete Intel GPUs, fanspeed and temperature 2025-07-25 23:06:03 +02:00
Jens Steube
a5bc4e7f71 Removed unsed macros in OpenCL/inc_vendor.h.
Re-enabled USE_BITSELECT for Intel GPUs.
Optimize vector version of hc_swap32() to allow using USE_SWIZZLE based technique on OpenCL in case USE_BITSELECT or USE_ROTATE is not set.
2025-07-25 10:57:13 +02:00
Jens Steube
f8cf74f54f
Merge pull request #4359 from matrix/opencl_and_more
Update filehandling, Metal and OpenCL backends, test_edge, user options
2025-07-25 08:55:24 +02:00
qasikfwn
35ff3047e4 Fix SIMD for 34200, 34201 a3 pure kernels 2025-07-25 14:11:01 +10:00
qasikfwn
4d27a0a6d8 Add pure kernels for 34211 2025-07-25 14:01:55 +10:00
Gabriele Gristina
524b76462a
Update filehandling, Metal and OpenCL backends, test_edge, user options
- solved TODOs in hc_fstat()
- fix memory leaks on Metal Backend
- using HC_OCL_CREATEBUFFER macro for buffer allocation and openclMemoryFlags array to configure the memory flags with OpenCL
- convert lasts CL_FALSE to CL_TRUE in hc_clEnqueueWriteBuffer() calls
- hide pyenv stderr on test_edge.sh
- do not allow --slow-candidates (-S) in benchmark mode
2025-07-24 23:34:55 +02:00
Jens Steube
b2c308d403 Add runtime OpenCL version detection and discrete Intel GPU tuning
Detect the highest supported OpenCL version at runtime and use the
appropriate -cl-std= flag when compiling kernels. This improves
compatibility with the Intel NEO driver. Note: behavior is untested
on other platforms (NVIDIA, AMD, Apple, etc.). Feedback will be
monitored.

Add tuningdb entries for discrete Intel GPUs. Copy over hash-mode
patterns that benefit from vectorizing on scalar compute units, based
on existing AMD and NVIDIA entries. This change also removes the
artificial thread limit previously enforced for discrete Intel GPUs.

Disable automatic vector width detection from the OpenCL runtime
except on CPU, where it remains in use.
2025-07-24 22:19:58 +02:00
Jens Steube
3344558396 Improved preferred thread size detection on Intel dGPU and workaround misleading reported compute unit count
Disabled Bitselect on OpenCL (no disadvantage on AMD/NV, but advantage on Intel)
2025-07-24 09:56:45 +02:00
Jens Steube
a312546665
Merge pull request #4357 from matrix/metal_memory_management
Metal Backend: improved memory management
2025-07-24 09:56:27 +02:00
Jens Steube
a12e1bf215
Merge pull request #4355 from Chick3nman/arg-parse-fix
Fix --total-candidates out of order arg parsing
2025-07-23 23:41:44 +02:00
Gabriele Gristina
b8c0cfee07
Metal Backend: improved memory management
Until now, support for Metal has been written using an Apple M1 and a 10-year-old Apple Intel as a basis to verify that the changes were also compatible with very old devices.
Recently, the code has been tested on an Apple M4 Pro, with a performance increase of about 3,7 times compared to the M1.
The code has also been sporadically tested on an Apple device with a discrete AMD GPU, but the performance was very low.

With this patch, I revisited memory management on Metal, initially creating an easily configurable array mapped 1 to 1 with the buffers allocated by hashcat.
The configuration refers to the Storage Mode associated with the buffers, as well as an ad hoc modification that transforms buffers
with a SHARED Storage Mode to MANAGED if the device is a discrete GPU and not an M* (Silicon) or integrated (Intel) one.

The result was excellent, as some very quick tests showed, for example, argon2 going from 10 H/s (1330.58ms) to 465 H/s (57.26ms)!
A 4550% increase in computational power and a 2223% increase in execution timing on the GPU!

In addition to the array for configuring the buffer storage modes, a macro, HC_MTL_CREATEBUFFER, has also been created.
This is used to generate the code that calls hc_mtlCreateBuffer, making the code much more readable than before.

In summary, this patch lays the groundwork for further improvements to the hashcat core, both on Metal itself and also for other runtimes, particularly OpenCL.
2025-07-23 22:13:26 +02:00
Chick3nman
f1a298188f Fix --total-candidates out of order arg parsing 2025-07-23 13:20:37 -05:00
qasikfwn
f583bbf574 Fix pw len variable names 2025-07-23 19:36:55 +10:00
qasikfwn
1bd68a5a80 Styling changes 2025-07-23 19:36:55 +10:00
qasikfwn
5b2a95800e Rename modes to 34200 2025-07-23 19:36:55 +10:00
qasikfwn
4b1a8f2623 More fixes 2025-07-23 19:36:55 +10:00
qasikfwn
8d38c6f808 Fix up c modules 2025-07-23 19:36:55 +10:00
qasikfwn
9a2207c632
Merge branch 'hashcat:master' into master 2025-07-23 19:36:19 +10:00
Jens Steube
89c0ab9b15 Check existence of all files listed with --veracrypt-keyfiles and
--truecrypt-keyfiles and error on startup if any file does not
exist or is not readable
2025-07-23 10:36:45 +02:00
Jens Steube
1fb79ac376 Synchronized 62xx with 293xx in both directions:
- Took keyfile and keyboard handling from 293xx and moved to 62xx
- Applied performance optimizations based on OPTS_TYPE parameters,
  fixed/limited kernel-loops/threads from 62xx and moved to 293xx
2025-07-23 09:37:07 +02:00
Jens Steube
c2199a927b Fixed kernel-loops and kernel-threads and removed OPTS_TYPE_NATIVE_THREADS in all VeraCrypt Plugins (improved performance)
Removed module_jit_build_options() from Electrum Wallet (Salt-Type 1-3) Plugin (improved performance)
2025-07-22 23:38:22 +02:00
qasikfwn
3a8ff9c8d9
Merge branch 'hashcat:master' into master 2025-07-22 19:40:23 +10:00
qasikfwn
e37800d9bb Fix up modules for new hashcat updates 2025-07-22 19:38:28 +10:00
Jens Steube
e7daa4b104 Fine-tuned with vector-size 2 both AMD and NV 2025-07-22 10:26:02 +02:00
Jens Steube
e90b6c8e53 Removed ALIGN_PTR_1k() macro for SCRYPT. This has a major impact on NV GPUs performance, though the reason is unclear. Pages are already aligned, and the macro is called outside the main loop, so the impact should be minimal.
Always enabled funnelshift on NV GPUs, even on unsupported models, as it has a positive effect on performance.
2025-07-22 09:51:33 +02:00
github-actions[bot]
af5c824936 Automatically updated docs/hashcat-help.md or docs/hashcat-example_hashes.md (by Github Action) 2025-07-21 20:35:37 +00:00