[GH-ISSUE #2118] Create a Snappy Ubuntu package for JtR #1414

Closed
opened 2026-10-15 04:16:07 +07:00 by bsakaguchi · 32 comments
Owner

Originally created by @ghost on GitHub (Apr 17, 2016).
Original GitHub issue: https://github.com/openwall/john/issues/2118

  • Snappy works on: Raspberry Pi 2, Intel NUC, Azure, Google Compute Engine cloud, Amazon Elastic Compute Cloud, Beagle, Duovero, ...
  • Snappy packages are going to be supported on Ubuntu 16.04 LTS [1].
  • It provides transactional updates with rigorous application isolation.
  • It has an improved security model.

So, when we have this available, users can install JtR via Ubuntu Store.

[1] Ubuntu 16.04 LTS introduces the snappy Ubuntu Core experience to the desktop by allowing you to create, install and distribute snaps (snappy apps).

Originally created by @ghost on GitHub (Apr 17, 2016). Original GitHub issue: https://github.com/openwall/john/issues/2118 - Snappy works on: Raspberry Pi 2, Intel NUC, Azure, Google Compute Engine cloud, Amazon Elastic Compute Cloud, Beagle, Duovero, ... - Snappy packages are going to be supported on Ubuntu 16.04 LTS [1]. - It provides transactional updates with rigorous application isolation. - It has an improved security model. So, when we have this available, users can install JtR via Ubuntu Store. [1] Ubuntu 16.04 LTS introduces the snappy Ubuntu Core experience to the desktop by allowing you to create, install and distribute snaps (snappy apps).
bsakaguchi 2026-10-15 04:16:07 +07:00
Author
Owner

@ghost commented on GitHub (Apr 17, 2016):

Thinking loud:

  • one package can handle (JtR already does this) AVX, SSE, XOP, ...
  • not sure: one package with MPI and one without it?
  • improve OpenCL runtime detection to use only one package?
<!-- gh-comment-id:210937832 --> @ghost commented on GitHub (Apr 17, 2016): Thinking loud: - one package can handle (JtR already does this) AVX, SSE, XOP, ... - not sure: one package with MPI and one without it? - improve OpenCL runtime detection to use only one package?
Author
Owner

@ghost commented on GitHub (Apr 17, 2016):

Ubuntu Core (150MB download) running inside kvm.

$ ./john -test=0
[...]
All 343 formats passed self-tests!


The basic stuff works fine, but the overall quality is low. Anyway, when the environment matures, it might be very useful.

$ kvm -m 512 -redir :8090::80 -redir :8022::22 ubuntu-snappy-amd64.img &
$ scp -CP 8022 JtR/*.snap ubuntu@localhost:~
$ ssh -p 8022 ubuntu@localhost
$ sudo snappy install john-the-ripper_1.8.0-Jumbo-2.dev_amd64.snap

<!-- gh-comment-id:211128034 --> @ghost commented on GitHub (Apr 17, 2016): Ubuntu Core (150MB download) running inside kvm. $ ./john -test=0 [...] All 343 formats passed self-tests! --- The basic stuff works fine, but the overall quality is low. Anyway, when the environment matures, it might be very useful. $ kvm -m 512 -redir :8090::80 -redir :8022::22 ubuntu-snappy-amd64.img & $ scp -CP 8022 JtR/*.snap ubuntu@localhost:~ $ ssh -p 8022 ubuntu@localhost $ sudo snappy install john-the-ripper_1.8.0-Jumbo-2.dev_amd64.snap
Author
Owner

@ghost commented on GitHub (Apr 18, 2016):

$ john-the-ripper --list=build-info
Version: 1.8.0-11765-g9a09113+
Build: linux-gnu 64-bit SSE2-ac
SIMD: SSE2, interleaving: MD4:3 MD5:3 SHA1:1 SHA256:1 SHA512:1
System-wide exec: $JOHN/
System-wide home: $JOHN/
Private home is /home/ubuntu/snap/john-the-ripper/100001/.john
$JOHN is /snap/john-the-ripper/100001/run/
Format interface version: 13
Max. number of reported tunable costs: 3
Rec file version: REC4
Charset file version: CHR3
CHARSET_MIN: 1 (0x01)
CHARSET_MAX: 255 (0xff)
CHARSET_LENGTH: 24
SALT_HASH_SIZE: 1048576
Max. Markov mode level: 400
Max. Markov mode password length: 30
gcc version: 5.3.1
GNU libc version: 2.23 (loaded: 2.23)
OpenCL headers version: 1.2
Crypto library: OpenSSL
OpenSSL library version: 01000207f
OpenSSL 1.0.2g-fips  1 Mar 2016
GMP library version: 6.1.0
Regex library version: 1.3  (loaded: 1.3.1)
File locking: fcntl()
fseek(): fseek
ftell(): ftell
fopen(): fopen
memmem(): System's
<!-- gh-comment-id:211422341 --> @ghost commented on GitHub (Apr 18, 2016): ``` $ john-the-ripper --list=build-info Version: 1.8.0-11765-g9a09113+ Build: linux-gnu 64-bit SSE2-ac SIMD: SSE2, interleaving: MD4:3 MD5:3 SHA1:1 SHA256:1 SHA512:1 System-wide exec: $JOHN/ System-wide home: $JOHN/ Private home is /home/ubuntu/snap/john-the-ripper/100001/.john $JOHN is /snap/john-the-ripper/100001/run/ Format interface version: 13 Max. number of reported tunable costs: 3 Rec file version: REC4 Charset file version: CHR3 CHARSET_MIN: 1 (0x01) CHARSET_MAX: 255 (0xff) CHARSET_LENGTH: 24 SALT_HASH_SIZE: 1048576 Max. Markov mode level: 400 Max. Markov mode password length: 30 gcc version: 5.3.1 GNU libc version: 2.23 (loaded: 2.23) OpenCL headers version: 1.2 Crypto library: OpenSSL OpenSSL library version: 01000207f OpenSSL 1.0.2g-fips 1 Mar 2016 GMP library version: 6.1.0 Regex library version: 1.3 (loaded: 1.3.1) File locking: fcntl() fseek(): fseek ftell(): ftell fopen(): fopen memmem(): System's ```
Author
Owner

@ghost commented on GitHub (Apr 19, 2016):

~$ john-the-ripper.john-the-ripper --stdout --regex='[0-2]password[A-C]'
Warning: regex mode currently can't be resumed if aborted
0passwordA
1passwordA
2passwordA
0passwordB
1passwordB
2passwordB
0passwordC
1passwordC
2passwordC
9p 0:00:00:00 0.00% 24.32p/s 2passwordC
<!-- gh-comment-id:211888141 --> @ghost commented on GitHub (Apr 19, 2016): ``` ~$ john-the-ripper.john-the-ripper --stdout --regex='[0-2]password[A-C]' Warning: regex mode currently can't be resumed if aborted 0passwordA 1passwordA 2passwordA 0passwordB 1passwordB 2passwordB 0passwordC 1passwordC 2passwordC 9p 0:00:00:00 0.00% 24.32p/s 2passwordC ```
Author
Owner

@ghost commented on GitHub (Apr 19, 2016):

  1. JOHN_SYSTEMWIDE_EXEC and JOHN_SYSTEMWIDE_HOME hard coded are suitable for the new era?
  2. I have to correct myself: the overall quality is low is a wrong statement. The real problems is the package system.
~$ john-the-ripper.john-the-ripper -form=raw-SHA512 $SNAP_USER_DATA/alltests.in --incremental -fork=2 --max-run=80
Created directory: /home/ubuntu/snaps/john-the-ripper.sideload/LWdCNNGPcKPf/.john
Using default input encoding: UTF-8
Loaded 20 password hashes with no different salts (Raw-SHA512 [SHA512 128/128 SSE2 2x])
Node numbers 1-2 of 2 (fork)
Press 'q' or Ctrl-C to abort, almost any other key for status
                 (?)
password         (?)
12345678         (?)
2 2g 0:00:01:18  0.02540g/s 366227p/s 366227c/s 6549KC/s l0431s..l0435p
1 1g 0:00:01:18  0.01270g/s 365427p/s 365427c/s 6943KC/s robchu1..robchuy
Waiting for 1 child to terminate
Warning: passwords printed above might not be all those cracked
Use the "--show" option to display all of the cracked passwords reliably
Session stopped (max run-time reached)
<!-- gh-comment-id:211889014 --> @ghost commented on GitHub (Apr 19, 2016): 1. JOHN_SYSTEMWIDE_EXEC and JOHN_SYSTEMWIDE_HOME hard coded are suitable for the new era? 2. I have to correct myself: `the overall quality is low` is a wrong statement. The real problems is the package system. ``` ~$ john-the-ripper.john-the-ripper -form=raw-SHA512 $SNAP_USER_DATA/alltests.in --incremental -fork=2 --max-run=80 Created directory: /home/ubuntu/snaps/john-the-ripper.sideload/LWdCNNGPcKPf/.john Using default input encoding: UTF-8 Loaded 20 password hashes with no different salts (Raw-SHA512 [SHA512 128/128 SSE2 2x]) Node numbers 1-2 of 2 (fork) Press 'q' or Ctrl-C to abort, almost any other key for status (?) password (?) 12345678 (?) 2 2g 0:00:01:18 0.02540g/s 366227p/s 366227c/s 6549KC/s l0431s..l0435p 1 1g 0:00:01:18 0.01270g/s 365427p/s 365427c/s 6943KC/s robchu1..robchuy Waiting for 1 child to terminate Warning: passwords printed above might not be all those cracked Use the "--show" option to display all of the cracked passwords reliably Session stopped (max run-time reached) ```
Author
Owner

@ghost commented on GitHub (Apr 24, 2016):

Working:

  • john-the-ripper.john-the-ripper --test=0;
  • Fallback for CPU and OMP;
  • regex and prince (libs are installed with/inside the package itself);
  • incremental, wordlist, single;
  • register the package and its name (see setpriority below);
  • setpriority with seccomp (release planned for a few weeks: 16.04.1(?)) - setpriority/nice disabled now;
  • python and ruby are not going to be installed with the package. Decide what to do with *2john files;
  • is experimental architectures usable? Find someone eager to try JtR on PI.
<!-- gh-comment-id:213996469 --> @ghost commented on GitHub (Apr 24, 2016): Working: - [x] john-the-ripper.john-the-ripper --test=0; - [x] Fallback for CPU and OMP; - [x] regex and prince (libs are installed with/inside the package itself); - [x] incremental, wordlist, single; - [x] register the package and its name (see setpriority below); - [x] setpriority with seccomp (release planned for a few weeks: 16.04.1(?)) - setpriority/nice disabled now; - [x] python and ruby are not going to be installed with the package. Decide what to do with *2john files; - [x] is experimental `architectures` usable? Find someone eager to try JtR on PI.
Author
Owner

@ghost commented on GitHub (May 7, 2016):

Just in case something unexpected appears on john-users:

The package itself works (real-world tests needed). No announcement done or planned for a while.

<!-- gh-comment-id:217655124 --> @ghost commented on GitHub (May 7, 2016): Just in case something unexpected appears on john-users: - There are people aware of the _snap package_: 1. http://blog.topspeedsnail.com/archives/4733 2. https://askubuntu.com/questions/763531/cant-install-snap-apps The package itself works (real-world tests needed). No announcement done or planned for a while.
Author
Owner

@solardiz commented on GitHub (May 8, 2016):

Claudio, I just want to let you know that I appreciate your work on this. Thank you!

<!-- gh-comment-id:217718303 --> @solardiz commented on GitHub (May 8, 2016): Claudio, I just want to let you know that I appreciate your work on this. Thank you!
Author
Owner

@ghost commented on GitHub (May 10, 2016):

image

image

<!-- gh-comment-id:218031272 --> @ghost commented on GitHub (May 10, 2016): ![image](https://cloud.githubusercontent.com/assets/1702923/15369302/6f8d2882-1d08-11e6-8298-45843ef008c9.png) ![image](https://cloud.githubusercontent.com/assets/1702923/15369320/7d000912-1d08-11e6-8d60-44951c2405cd.png)
Author
Owner

@magnumripper commented on GitHub (May 10, 2016):

Thinking loud:

  • one package can handle (JtR already does this) AVX, SSE, XOP, ...
  • not sure: one package with MPI and one without it?
  • improve OpenCL runtime detection to use only one package?

Using dlopen for OpenCL would take a fair amount of work but is definitely doable (Hashkill does that).

Now that I think about it, doing the same for MPI should be much easier. I'll open issues for these.

<!-- gh-comment-id:218062321 --> @magnumripper commented on GitHub (May 10, 2016): > Thinking loud: > - one package can handle (JtR already does this) AVX, SSE, XOP, ... > - not sure: one package with MPI and one without it? > - improve OpenCL runtime detection to use only one package? Using dlopen for OpenCL would take a fair amount of work but is definitely doable (Hashkill does that). Now that I think about it, doing the same for MPI should be much easier. I'll open issues for these.
Author
Owner

@ghost commented on GitHub (May 10, 2016):

Using dlopen for OpenCL would take a fair amount of work but is definitely doable (Hashkill does that).

This make sense and is going to be very useful. If you use a fallback executable, it can be much easier, no?
(I might be confused about the real challenge here).

if dlopen("opencl_lib")
   exec("/regular/opencl_build/JtR")
else
   'Go-on and use this non-opencl build

BTW:

  • To be a Snappy app, this might be not necessary, since I can assure Generic OpenCL ICD Loader is always available. So, using one executable, I can enabled OpenCL formats only if there is at least one device available.
  • I haven't tested the idea since I'm far from home and, even if I bring my computer, I can't use OpenCL on Ubuntu 16.04 (no AMD OpenCL for a while).

Keep this in mind to make your final decision.

<!-- gh-comment-id:218192446 --> @ghost commented on GitHub (May 10, 2016): > Using dlopen for OpenCL would take a fair amount of work but is definitely doable (Hashkill does that). This make sense and is going to be very useful. If you use a fallback executable, it can be much easier, no? _(I might be confused about the real challenge here)._ ``` if dlopen("opencl_lib") exec("/regular/opencl_build/JtR") else 'Go-on and use this non-opencl build ``` BTW: - To be a Snappy app, this might be not necessary, since I can assure Generic OpenCL ICD Loader is always available. So, using one executable, I can enabled OpenCL formats only if there is at least one device available. - I haven't tested the idea since I'm far from home and, even if I bring my computer, I can't use OpenCL on Ubuntu 16.04 (no AMD OpenCL for a while). Keep this in mind to make your final decision.
Author
Owner

@magnumripper commented on GitHub (May 10, 2016):

if dlopen("opencl_lib")
   exec("/regular/opencl_build/JtR")
else
   'Go-on and use this non-opencl build

Wow that is a quick solution... and it should work just fine. I never thought of that!

<!-- gh-comment-id:218217497 --> @magnumripper commented on GitHub (May 10, 2016): > ``` > if dlopen("opencl_lib") > exec("/regular/opencl_build/JtR") > else > 'Go-on and use this non-opencl build > ``` Wow that is a quick solution... and it should work just fine. I never thought of that!
Author
Owner

@magnumripper commented on GitHub (May 10, 2016):

On the other hand we've been discussing doing the opposite: Include code for SSE2/3/4.1, AVX, AVX2 and whatnot in a single binary, that picks code path at run time. That together with real use of dlopen() for OpenCL and MPI (and perhaps librexgen etc.) would provide a single binary capable of most anything. It would be a bit fatter though.

<!-- gh-comment-id:218218818 --> @magnumripper commented on GitHub (May 10, 2016): On the other hand we've been discussing doing the opposite: Include code for SSE2/3/4.1, AVX, AVX2 and whatnot in a single binary, that picks code path at run time. That together with real use of `dlopen()` for OpenCL and MPI (and perhaps librexgen etc.) would provide a single binary capable of most anything. It would be a bit fatter though.
Author
Owner

@ghost commented on GitHub (May 10, 2016):

The ugly

  • after OpenCL, a lot of executable files (avx, avx_omp, avx_cl, avx_omp_cl, sse_cl, ...).

The other path (one binary for everything) has pros and cons. An important: Invasive. Could frighten people.

<!-- gh-comment-id:218224722 --> @ghost commented on GitHub (May 10, 2016): The ugly - after OpenCL, a lot of executable files (avx, avx_omp, avx_cl, avx_omp_cl, sse_cl, ...). The other path (one binary for everything) has pros and cons. An important: Invasive. Could frighten people.
Author
Owner

@magnumripper commented on GitHub (May 10, 2016):

We currently have SSE2, SSSE3, SSE4.1, AVX and AVX2 on one hand, and OMP/non-OMP on the other. That's 2x5 == 10 combinations. Adding AVX512, OpenCL and MPI to the mix will mean 2x2x2x6 == 48 combinations... not to mention the time for building them.

<!-- gh-comment-id:218237896 --> @magnumripper commented on GitHub (May 10, 2016): We currently have SSE2, SSSE3, SSE4.1, AVX and AVX2 on one hand, and OMP/non-OMP on the other. That's 2x5 == 10 combinations. Adding AVX512, OpenCL and MPI to the mix will mean 2x2x2x6 == 48 combinations... not to mention the time for building them.
Author
Owner

@magnumripper commented on GitHub (May 10, 2016):

But for this Snappy thing (which I have yet to get acquainted with) like you said you can just build with OpenCL and MPI support and ensure the run-time libs are included. The functionality will not hurt at all even if unused.

<!-- gh-comment-id:218238452 --> @magnumripper commented on GitHub (May 10, 2016): But for this Snappy thing (which I have yet to get acquainted with) like you said you can just build with OpenCL and MPI support and ensure the run-time libs are included. The functionality will not hurt at all even if unused.
Author
Owner

@ghost commented on GitHub (May 10, 2016):

which I have yet to get acquainted with

If you need to try it yourself (disclaimer: Ubuntu Core 16.04 is under construction, you will notice that the welcome message is simply wrong).

On a deb base system
$ sudo apt-get install qemu-kvm

On Fedora (my guess)
# yum install kvm

On the fancy OS
no idea

Obtain Ubuntu Core image (200MB)

$ wget https://people.canonical.com/~mvo/all-snaps/amd64-all-snap.img.xz
$ unxz amd64-all-snap.img.xz

Launch the VM
$ kvm -m 512 -redir :8022::22 amd64-all-snap.img &

Access the VM (user and password are "ubuntu")
$ ssh -p 8022 ubuntu@localhost

Install JtR (70MB)
$ sudo snap install john-the-ripper

Test if John is working properly
$ john-the-ripper -test=0

$ export DATA=/home/ubuntu/snap/john-the-ripper/5/.john
$ john-the-ripper -list=format-tests | cut -f3 > $DATA/alltests.in
$ john-the-ripper -form=SHA512crypt $DATA/alltests.in

Obs: John the Ripper Jumbo with CPU and OpenMP fallback.

<!-- gh-comment-id:218257535 --> @ghost commented on GitHub (May 10, 2016): > which I have yet to get acquainted with If you need to try it yourself (_disclaimer_: Ubuntu Core 16.04 is under construction, you will notice that the welcome message is simply wrong). On a deb base system `$ sudo apt-get install qemu-kvm` On Fedora (my guess) `# yum install kvm` On the fancy OS `no idea` Obtain Ubuntu Core image (200MB) ``` $ wget https://people.canonical.com/~mvo/all-snaps/amd64-all-snap.img.xz $ unxz amd64-all-snap.img.xz ``` Launch the VM `$ kvm -m 512 -redir :8022::22 amd64-all-snap.img &` Access the VM (**user** and **password** are "ubuntu") `$ ssh -p 8022 ubuntu@localhost` Install JtR (70MB) `$ sudo snap install john-the-ripper` Test if John is working properly `$ john-the-ripper -test=0` ``` $ export DATA=/home/ubuntu/snap/john-the-ripper/5/.john $ john-the-ripper -list=format-tests | cut -f3 > $DATA/alltests.in $ john-the-ripper -form=SHA512crypt $DATA/alltests.in ``` Obs: John the Ripper Jumbo with CPU and OpenMP fallback.
Author
Owner

@ghost commented on GitHub (May 13, 2016):

John the Ripper Jumbo with:

  • CPU and OpenMP fallback;
  • with OpenCL auto-detection.
$ john-the-ripper -test --form=raw-sha512-opencl
Unknown ciphertext format name requested

$ john-the-ripper --list=opencl-devices
No OpenCL devices found

$ john-the-ripper -test --form=raw-sha512
Benchmarking: Raw-SHA512 [SHA512 128/128 SSE2 2x]... DONE
Raw:    893578 c/s real, 893578 c/s virtual
<!-- gh-comment-id:219177803 --> @ghost commented on GitHub (May 13, 2016): John the Ripper Jumbo with: - CPU and OpenMP fallback; - with OpenCL auto-detection. ``` $ john-the-ripper -test --form=raw-sha512-opencl Unknown ciphertext format name requested $ john-the-ripper --list=opencl-devices No OpenCL devices found $ john-the-ripper -test --form=raw-sha512 Benchmarking: Raw-SHA512 [SHA512 128/128 SSE2 2x]... DONE Raw: 893578 c/s real, 893578 c/s virtual ```
Author
Owner

@frank-dittrich commented on GitHub (May 14, 2016):

What happens if you run --test=0?
Will john try to test opencl formats (and fail)?

Should OpenCL formats be listed only

if (get_number_of_devices_in_use())

I.e., do we need to adjust the output of --list=formats, --list=format-details, an may be the

--format=CLASS            valid classes: dynamic, cpu, gpu, opencl, omp

in the --list=hidden-options output?

This might be useful for bash completion, for johnny (the gui) or just for somehow letting the jtrTestSuite know that opencl formats can't be tested.

Time to add a --list=runtime-info to the hidden options?

<!-- gh-comment-id:219209523 --> @frank-dittrich commented on GitHub (May 14, 2016): What happens if you run `--test=0`? Will john try to test opencl formats (and fail)? Should OpenCL formats be listed only ``` if (get_number_of_devices_in_use()) ``` I.e., do we need to adjust the output of `--list=formats`, `--list=format-details`, an may be the ``` --format=CLASS valid classes: dynamic, cpu, gpu, opencl, omp ``` in the `--list=hidden-options output`? This might be useful for bash completion, for johnny (the gui) or just for somehow letting the jtrTestSuite know that opencl formats can't be tested. Time to add a `--list=runtime-info` to the hidden options?
Author
Owner

@ghost commented on GitHub (May 14, 2016):

What happens if you run --test=0?

It works. I already worked around it. But I guess the final solution will be to register (inside john_register_one) an OpenCL format only if (get_number_of_available_devices() > 0).

There are even more use cases requiring to change registering:

  • e.g., crypt(3) hash recommendations for a run without --format.
  • --list=format-tests
  • ...

Edge cases to be solved otherwise

  • --format=CLASS

That said:

  • the OpenCL auto-detection should be merged on Jumbo because a regular user has to be able to remove his GPU(s) without the need to rebuild JtR.
  • once done, I need to check if any OpenCL device is available even for a non OpenCL run [1]. Solar once complained about this.
  • previous committed code calls OpenCL stuff only inside fmt_init().

[1] (Have to check) this won't happen for a -format=xxx-cpu-only run.

<!-- gh-comment-id:219229987 --> @ghost commented on GitHub (May 14, 2016): > What happens if you run --test=0? It works. I already worked around it. But I guess the final solution will be to register (inside john_register_one) an OpenCL format only if (get_number_of_available_devices() > 0). There are even more use cases requiring to change registering: - e.g., crypt(3) hash recommendations for a run without --format. - --list=format-tests - ... Edge cases to be solved otherwise - --format=CLASS That said: - the OpenCL auto-detection should be merged on Jumbo because a regular user has to be able to remove his GPU(s) without the need to rebuild JtR. - once done, I need to check if any OpenCL device is available even for a non OpenCL run [1]. Solar once complained about this. - previous committed code calls OpenCL stuff only inside fmt_init(). [1] (Have to check) this won't happen for a -format=xxx-cpu-only run.
Author
Owner

@ghost commented on GitHub (May 14, 2016):

Sorry, read the previous comment on GitHub site.

<!-- gh-comment-id:219230157 --> @ghost commented on GitHub (May 14, 2016): Sorry, read the previous comment on GitHub site.
Author
Owner

@ghost commented on GitHub (May 20, 2016):

Well, since I was unable to find a better approach, I intend to:

  • add (to the existing snap package) new command. It means.

CPU only (CPU fallback, OMP fallback, regex, etc)
$ john-the-ripper --list=build-info

CPU + OpenCL (CPU fallback, OMP fallback, regex, etc)
$ john-the-ripper.opencl --list=build-info

So, one snap will have all 16 john binaries.

  • john-the-ripper: is the application name;
  • opencl: is one of its commands (I can create cpu, mpi, whatever).

Of course, we can shrink the package creating one snap for OpenCL, one for MPI, ...

Comments are welcome.

<!-- gh-comment-id:220490356 --> @ghost commented on GitHub (May 20, 2016): Well, since I was unable to find a better approach, I intend to: - add (to the existing snap package) new command. It means. CPU only (CPU fallback, OMP fallback, regex, etc) `$ john-the-ripper --list=build-info` CPU + OpenCL (CPU fallback, OMP fallback, regex, etc) `$ john-the-ripper.opencl --list=build-info` So, one snap will have all 16 john binaries. - john-the-ripper: is the application name; - opencl: is one of its commands (I can create cpu, mpi, whatever). Of course, we can shrink the package creating one snap for OpenCL, one for MPI, ... Comments are welcome.
Author
Owner

@ghost commented on GitHub (Jun 12, 2016):

Create a JtR package for Windows 10 (zip or Windows Store).

Testing Ubuntu binaries of John the Ripper Jumbo on Windows 10 64bits.

  • It's native Ubuntu binaries running directly in Windows.
  • Bit-for-bit, checksum-for-checksum Ubuntu ELF binaries running directly in Windows.

Notice:

  • It will allow us to create a zip file or publish on Windows Store the same binaries used in the SNAP package.
  • Using a VM, container, whatever, it will be possible to automate / isolate the building (I'm using a VM).

PS: not sure if one can publish using a free Vistual Studio.

Working

  • syscall setpriority
  • fork
  • OpenMP
  • timers, --max-run-time
  • do crack, log, cracking modes, ...
  • LD_LIBRARY_PATH, Ctrl+C
<!-- gh-comment-id:225455551 --> @ghost commented on GitHub (Jun 12, 2016): #### Create a JtR package for Windows 10 (zip or Windows Store). Testing Ubuntu binaries of John the Ripper Jumbo on Windows 10 64bits. - It's **native** Ubuntu binaries running directly in Windows. - Bit-for-bit, checksum-for-checksum **Ubuntu ELF binaries running directly in Windows**. Notice: - It will allow us to create a zip file or publish on Windows Store the same binaries used in the SNAP package. - Using a VM, container, whatever, it will be possible to automate / isolate the building (I'm using a VM). PS: not sure if one can publish using a free Vistual Studio. Working - [x] syscall setpriority - [x] fork - [x] OpenMP - [x] timers, --max-run-time - [x] do crack, log, cracking modes, ... - [x] LD_LIBRARY_PATH, Ctrl+C
Author
Owner

@ghost commented on GitHub (Jun 12, 2016):

j5

<!-- gh-comment-id:225455656 --> @ghost commented on GitHub (Jun 12, 2016): ![j5](https://cloud.githubusercontent.com/assets/1702923/15993386/d3dd434c-30ba-11e6-98c6-0ceb2a77d3f9.png)
Author
Owner

@ghost commented on GitHub (Jun 12, 2016):

Tested so far:

$  export DATA=/home/winlix/snap/john-the-ripper
$ ./john-the-ripper -list=format-tests | cut -f3 > $DATA/alltests.in
$ ./john-the-ripper -form=raw-SHA512 $DATA/alltests.in --max-run=30
$ ./john-the-ripper -form=SHA512crypt $DATA/alltests.in
$ ./john-the-ripper -form=raw-SHA512 $DATA/alltests.in --incremental -fork=2 --max-run=80
$ ./john-the-ripper -form=SHA512crypt --test=2
Will run 6 OpenMP threads
Benchmarking: sha512crypt, crypt(3) $6$ (rounds=5000) [SHA512 128/128 SSE2 2x]... (6xOMP) DONE
Speed for cost 1 (iteration count) of 5000
Raw:    2767 c/s real, 467 c/s virtual
Format Win c/s Linux c/s [2] Linux c/s [3]
raw-sha512 8933K 9172K 2641K
raw-sha256 15347K 14745K 5271K
sha512crypt 2792 2671 520
sha256crypt 3375 2871 653

[1] Using the same machine via dual booting. Ubuntu 16.04 LTS snap app.
[2] With OpenMP, 6 threads.
[3] Disable OpenMP via OMP_THREAD_LIMIT=1

<!-- gh-comment-id:225456235 --> @ghost commented on GitHub (Jun 12, 2016): Tested so far: ``` $ export DATA=/home/winlix/snap/john-the-ripper $ ./john-the-ripper -list=format-tests | cut -f3 > $DATA/alltests.in $ ./john-the-ripper -form=raw-SHA512 $DATA/alltests.in --max-run=30 $ ./john-the-ripper -form=SHA512crypt $DATA/alltests.in $ ./john-the-ripper -form=raw-SHA512 $DATA/alltests.in --incremental -fork=2 --max-run=80 ``` ``` $ ./john-the-ripper -form=SHA512crypt --test=2 Will run 6 OpenMP threads Benchmarking: sha512crypt, crypt(3) $6$ (rounds=5000) [SHA512 128/128 SSE2 2x]... (6xOMP) DONE Speed for cost 1 (iteration count) of 5000 Raw: 2767 c/s real, 467 c/s virtual ``` | Format | Win c/s | Linux c/s [2] | Linux c/s [3] | | --- | --- | --- | --- | | raw-sha512 | 8933K | 9172K | 2641K | | raw-sha256 | 15347K | 14745K | 5271K | | sha512crypt | 2792 | 2671 | 520 | | sha256crypt | 3375 | 2871 | 653 | [1] Using the same machine via dual booting. Ubuntu 16.04 LTS snap app. [2] With OpenMP, 6 threads. [3] Disable OpenMP via OMP_THREAD_LIMIT=1
Author
Owner

@ghost commented on GitHub (Jun 13, 2016):

Since we already have hundreds of installations, I intend to publish this on john-users:


Greetings

For some time now, we have a John the Ripper SNAP package available on Ubuntu Store. The plan is to release it as stable and tested, but offering recent bug fixes and improvements.

To install it, on Ubuntu 16.04 LTS, you only need to run a:
$ sudo snap install john-the-ripper

To test it, do:
$ john-the-ripper --list=build-info

John run confined under a restrictive security sandbox by default. For example, it won't be able to read or write any file outside its "box". So, word-lists, hash files, and so on, should be copied to the "box". Below, an example:
$ export DATA=/home/user/snap/john-the-ripper/5/.john
$ john-the-ripper -list=format-tests | cut -f3 > $DATA/alltests.in
$ john-the-ripper -form=SHA512crypt $DATA/alltests.in

The highlights:

  • fallback for CPU and OMP.
  • regex and prince modes available.

More information at https://github.com/magnumripper/JohnTheRipper/issues/2118. Feedback is welcome.

Happy cracking

<!-- gh-comment-id:225675246 --> @ghost commented on GitHub (Jun 13, 2016): Since we already have hundreds of installations, I intend to publish this on john-users: --- Greetings For some time now, we have a John the Ripper SNAP package available on Ubuntu Store. The plan is to release it as stable and tested, but offering recent bug fixes and improvements. To install it, on Ubuntu 16.04 LTS, you only need to run a: $ sudo snap install john-the-ripper To test it, do: $ john-the-ripper --list=build-info John run confined under a restrictive security sandbox by default. For example, it won't be able to read or write any file outside its "box". So, word-lists, hash files, and so on, should be copied to the "box". Below, an example: $ export DATA=/home/user/snap/john-the-ripper/5/.john $ john-the-ripper -list=format-tests | cut -f3 > $DATA/alltests.in $ john-the-ripper -form=SHA512crypt $DATA/alltests.in The highlights: - fallback for CPU and OMP. - regex and prince modes available. More information at https://github.com/magnumripper/JohnTheRipper/issues/2118. Feedback is welcome. Happy cracking
Author
Owner

@ghost commented on GitHub (Jun 14, 2016):

For the record. More info at: https://lists.ubuntu.com/archives/snapcraft/2016-June/000193.html

[...] snaps should now work, unmodified, on Arch, CentOS, Debian, Elementary, Fedora, Gentoo, RHEL, SUSE... and of course the whole family of *buntu's.
[...]

<!-- gh-comment-id:225962939 --> @ghost commented on GitHub (Jun 14, 2016): For the record. More info at: https://lists.ubuntu.com/archives/snapcraft/2016-June/000193.html > [...] snaps should now work, unmodified, on Arch, CentOS, Debian, Elementary, Fedora, Gentoo, RHEL, SUSE... and of course the whole family of *buntu's. > [...]
Author
Owner

@ghost commented on GitHub (Jun 28, 2016):

There is an armhf (arm7) version available on Ubuntu Store for a week or so. It has:

  • regex and prince modes available
  • fallback for OMP
<!-- gh-comment-id:228934692 --> @ghost commented on GitHub (Jun 28, 2016): There is an armhf (arm7) version available on Ubuntu Store for a week or so. It has: - regex and prince modes available - fallback for OMP
Author
Owner

@ghost commented on GitHub (Jul 13, 2016):

Well, I dont have hardware to develop and test the changes needed in Ubuntu Core to allow OpenCL confined. I intend to create a workaround. Notice:

  1. CPU OpenCL fails even in --devmode (a workaround is needed anyway).
  2. Older AMD GPU (< GCN 1.1) is legacy hardware.

The procedure is:

$ export SNAP=/snap/john-the-ripper/10 #--10-- is the latest/desired installed version/revision 
$ /snap/john-the-ripper/10/john-the-ripper.opencl --list=build-info
<!-- gh-comment-id:232369905 --> @ghost commented on GitHub (Jul 13, 2016): Well, I dont have hardware to develop and test the changes needed in Ubuntu Core to allow OpenCL confined. I intend to create a workaround. Notice: 1. CPU OpenCL fails even in --devmode (a workaround is needed anyway). 2. Older AMD GPU (< GCN 1.1) is legacy hardware. The procedure is: ``` $ export SNAP=/snap/john-the-ripper/10 #--10-- is the latest/desired installed version/revision $ /snap/john-the-ripper/10/john-the-ripper.opencl --list=build-info ```
Author
Owner

@ghost commented on GitHub (Jul 29, 2016):

Posting the message below to john-users and closing:

BTW: it is possible to run the JtR openCL binary using the workaround seen below (notice: 12 is the current/desired revision [1]):
~$ /snap/john-the-ripper/12/john-the-ripper.opencl -list=build-info
~$ /snap/john-the-ripper/12/john-the-ripper.opencl -list=opencl-devices

Cracking using the CPU and/or the OpenCL version:
~$ export DATA=$HOME/snap/john-the-ripper/12/.john
~$ john-the-ripper -list=format-tests | cut -f3 > $DATA/alltests.in
~$ /snap/john-the-ripper/12/john-the-ripper.opencl -form=SHA512crypt-opencl $DATA/alltests.in
~$ john-the-ripper -form=SHA512crypt $DATA/alltests.in


Just in case you have ARM hardware, there are armhf and arm64 JtR versions available on Ubuntu Store. They have:

  • regex and prince modes available
  • fallback for OMP

If your distro already accepts the snap format (without a store), it is possible to download the reviewed snap package from: https://uappexplorer.com/app/john-the-ripper.claudioandre-br

Claudio

[1] Rev 12 means commit: 36a7264b2c from July 29th. Execute a sudo snap refresh and/or snap list to assure you have the latest version installed.

<!-- gh-comment-id:236193040 --> @ghost commented on GitHub (Jul 29, 2016): ## Posting the message below to john-users and closing: BTW: it is possible to run the JtR openCL binary using the workaround seen below (notice: 12 is the current/desired revision [1]): ~$ /snap/john-the-ripper/12/john-the-ripper.opencl -list=build-info ~$ /snap/john-the-ripper/12/john-the-ripper.opencl -list=opencl-devices Cracking using the CPU and/or the OpenCL version: ~$ export DATA=$HOME/snap/john-the-ripper/12/.john ~$ john-the-ripper -list=format-tests | cut -f3 > $DATA/alltests.in ~$ /snap/john-the-ripper/12/john-the-ripper.opencl -form=SHA512crypt-opencl $DATA/alltests.in ~$ john-the-ripper -form=SHA512crypt $DATA/alltests.in --- Just in case you have ARM hardware, there are armhf and arm64 JtR versions available on Ubuntu Store. They have: - regex and prince modes available - fallback for OMP --- If your distro already accepts the snap format (without a store), it is possible to download the reviewed snap package from: https://uappexplorer.com/app/john-the-ripper.claudioandre-br Claudio [1] Rev 12 means commit: 36a7264b2c7e6c1f682300c547cd41f2ff021ed1 from July 29th. Execute a sudo snap refresh and/or snap list to assure you have the latest version installed.
Author
Owner

@ghost commented on GitHub (Dec 5, 2016):

I just created a readme file (since I started to wonder details about the package). Everything is there, even the new fancy stuff.

BTW: nice to see; strong foundations, high-quality software engineering.

<!-- gh-comment-id:264756374 --> @ghost commented on GitHub (Dec 5, 2016): I just created a [readme file](https://github.com/claudioandre/packages/tree/master/john-the-ripper#john-the-ripper) (since I started to wonder details about the package). Everything is there, even the [new fancy stuff](https://github.com/claudioandre/packages/tree/master/john-the-ripper#flatpak). BTW: nice to see; strong foundations, high-quality software engineering.
Author
Owner

@ghost commented on GitHub (Mar 2, 2018):

More notes at:
https://snapcraft.io/john-the-ripper

<!-- gh-comment-id:370027025 --> @ghost commented on GitHub (Mar 2, 2018): More notes at: https://snapcraft.io/john-the-ripper
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#1414
No description provided.