Code Monkey home page Code Monkey logo

gocrack's Introduction

gocrack

Build Status codecov reportcard

GoCrack Logo

GoCrack provides APIs to manage password cracking tasks across supported cracking engines.

Supported Engines

Documentation

Click here

License

MIT.

gocrack's People

Contributors

brianclemens avatar ccob avatar dotter100 avatar kulinacs avatar seadog007 avatar tankbusta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gocrack's Issues

Error when start the server

Compiling is OK,but,when I run this command ./gocrack_server -config ../../../docs/default_server_config.yaml ,there is an error presented:
{"time":"2017-11-14T01:04:25-08:00","level":"fatal","error":"asn1: structure error: tags don't match (6 vs {class:0 tag:17 length:29 isCompound:true}) {optional:false explicit:false application:false defaultValue:<nil> tag:<nil> stringType:0 timeType:0 set:false omitEmpty:false} ObjectIdentifier @2","message":"Failed to start server"}
default_server_config.yaml is as follows:

`---
web_server:
listener:
# The IP/FQDN:port for the Userland/UI API
address: ":1338"
cors:
# For browsers: This sets the allowed origins where requests are allowed to be made from
allowed_origins:
- "http://localhost:8080"
ui:
# This should be set to a secure string as it's used to sign the user cookie for CSRF state
csrf_key: iAmAnIndependentStrongPassswordThatNeedsToBeSecure
rpc_server:
listener:
# The IP/FQDN:port for the worker listener
address: ":1339"
# SSL Settings: This should always be enabled unless you're proxying it through a web server.
# If so, set this to false and the SSL fields below can be removed. You should still do SSL via the web server!
ssl_enabled: true
ssl_ca_certificate: |
-----BEGIN CERTIFICATE-----
MIIDITCCAgmgAwIBAgIJAOdeKX0sbzo9MA0GCSqGSIb3DQEBCwUAMBAxDjAMBgNV
BAMMBWhlbGxvMB4XDTE3MTExNDA4MzEzOFoXDTI3MTExMjA4MzEzOFowEDEOMAwG
A1UEAwwFaGVsbG8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDE0GdI
aPDE5h3eZMJpDB4inNtD2QBoGn7M/Opl7SoOiOhCNbU68E5zEhbeOsdBH2nLgQKy
z1iPxmDse5rKm/MHC/SUW7pyfx/neRsKoIpJtgYAX6yfRjefCKEQv/Ix91eKtJXe
OeNzNLqr7aZK/u7bicMuavB8/wFyIhnWeCgOgf4OSiYmrQCAiz75Gio91E8bsNju
crreEy0NVmNYY7hDXvZuVLgZ4uA4K+PoxKmaAzllc/txdVN9ppVzt9CXbnuVT8a6
nMQoeZoN0LXeXhPyNipjLHdAcCt9D08hf9vKr6ZPATGhO9tbPP2YsxzAmFbe94+2
iwkkZAYwJRQkVf9DAgMBAAGjfjB8MB0GA1UdDgQWBBSKiRFAHehJJ1MujCQw0l5b
gjfPwTBABgNVHSMEOTA3gBSKiRFAHehJJ1MujCQw0l5bgjfPwaEUpBIwEDEOMAwG
A1UEAwwFaGVsbG+CCQDnXil9LG86PTAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIB
BjANBgkqhkiG9w0BAQsFAAOCAQEARu4MYCnn2zQEkVagUpRzX7Ez4LgGxR7fSjCt
uYGugNRLgmRriLlv9JN0eye6mqj8XXEEeGAFxH/FQEFnSsKzciSPLIXHXTK4pApi
NvUklEm8IpWkf315oHxAOyeUkyAat9K6XMM0jyCfwhrSGOL4bMcVrmPzfPk+ttEw
h9iNiP5SziS6jo7GQNQR2k6R4MZUtW+pTiFXe4dexzKnYxclQZTPFNMdBJoXB4WR
IOKLye0CHgccyPEEDDl4/fw0ZRMI4NnBfZQmMuEk6Wg8I6clOzXdsgSge2h18lfY
q62Mks2mH5fHqhPvFNknmhGfkaMrj9k8L2IzYM8O1VKblA7sWA==
-----END CERTIFICATE-----
ssl_certificate: |
-----BEGIN CERTIFICATE-----
MIICZDCCAUwCAQAwHzEdMBsGA1UEAwwUZ29jcmFjay5zZXJ2ZXIubG9jYWwwggEi
MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDcKB+TkZZUQxxRvenUPi158JkJ
oNkmocLk2IiJA86KAPLHzVo4YjgAg8v37sfMzOOBSxwS+7VKfGulXVxuiASAUVrb
N+tOj+JRJABJ11Jrqf6RGn/skN56xGAXtYSAcgijuGSWZbo2J3nvoGFDOvLFyrIm
j9/w588KCMQSu1mnBzvTcXCpagdj/DuGchNpM0izrQrln64CAZMck/LdyjaH/MKF
fG0Lwvrc1VJFS4bP3VPdUFPob88MQuwzpTdCopgfznQgRXD+lG9OYTU6UK95CmLi
+xQH2vS4u1OJdp3XxL+FJCarNcskHhE2VhjsCcsXMFmsse4foKD8yEZ+7DRPAgMB
AAGgADANBgkqhkiG9w0BAQsFAAOCAQEADVMsWbkl7lr4Cv3+EryGUFGVAIx3XvBT
ZqVNnfaEVy15Bqrs7ZmSB3Cd7iEkTj8aYzKZdt1H6RcEOIrXEIXvKAD4EFfQW7yA
8owwRtSe9qUWQeyBj54ZsvEx+tLVXTKixRw6SpL4MNOE935+Vc0DLfO6zJMxJzSB
CmvrntUOhLfo1xMfIb1MroqEpmURpqqOmB5IpiBLRnlAKivFyrBzfkKHzd7z6TeK
wloPJEXOfNaArkfvADqLFJQZHcJuVDaqDCNOY93izEgKIw5N0/mVNl5mUe2e1UsS
iuz8eXqiWY5u6Yqa2r6szD3vi3ylbgqwWhPWnFJnE6r0k2nLguF2nQ==
-----END CERTIFICATE-----
ssl_private_key: |
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEA3Cgfk5GWVEMcUb3p1D4tefCZCaDZJqHC5NiIiQPOigDyx81a
OGI4AIPL9+7HzMzjgUscEvu1SnxrpV1cbogEgFFa2zfrTo/iUSQASddSa6n+kRp/
7JDeesRgF7WEgHIIo7hklmW6Nid576BhQzryxcqyJo/f8OfPCgjEErtZpwc703Fw
qWoHY/w7hnITaTNIs60K5Z+uAgGTHJPy3co2h/zChXxtC8L63NVSRUuGz91T3VBT
6G/PDELsM6U3QqKYH850IEVw/pRvTmE1OlCveQpi4vsUB9r0uLtTiXad18S/hSQm
qzXLJB4RNlYY7AnLFzBZrLHuH6Cg/MhGfuw0TwIDAQABAoIBACIuPJDNtrhIXxo1
0Rr5uFfJSglbprs/vCGJmNEk/Skh8o+gy1Qbs7Qowj8xHGYonV3Sin5MBB6XaKMY
9qPWjFRbzS5h5S+iWTHd1Ami25IJp5NhuODCsTgASycDMJo8mijJFRzgmGOWB3Fz
xgYJHe4lhTlFdzBQ3S0ipUZ/PfEXfbCIcs1wWWaNljgj6tPuyXZH2WrvCDUXB8+V
Q874z46K4zyPjdVRzvxas6Q/UQqYje/KW3Xpui9cov1bJaHelF5gto0zP3K4Lea1
wzMigl06Rry50w579kWa1ATV04DFAkX+L5t3KNp16NwB9HDMKvXjOtkbe7KX0G/a
vvZ8JxkCgYEA8cfNdun+mO578xk18TgOuAQqLNJwkxx3UOoNp0XSogYFDWctb8hd
6//Fppm3fEnOszfFqEMt++60NGVMtfk4yZ0PBAOdCoc3yEkAWTnK9ed9xs+ypgxX
1OtA0a1xA1kqeoL6ZzOZNvnl5ZX7goxFp+UbUn93CeuHucno4XtbNdUCgYEA6RrC
DuJ9DBy2e47et2SNxev8v6mNX/tsS74b1bB1A1o6sC0B0IhQ8qFXBguQSPjlbX0A
gyGxOriLtxObYTue1lyUFuxH3w67adXcMcyZnRgpqE2J5pCvAkarmnLvBtentCn6
tZaWzyYZZF0U28vC75d4kQSqDUmSHy/5g9Qpn5MCgYB3YwqwwkCGcZRg6Lz7HIwg
D2Zn9Y3DBpZgLQKK625jtQc/pAgKn2zJQOXvKw4wYB2h31NJj8qgETGIgdDMNoD1
BQnKGKKt9TD1RB7Y8DGpFSLFTf/QAF5Kc9Pw9WzNk3TnQ8+zsAXi4KjFojasMume
SwIfzXMRQe0mL25AEPJr9QKBgQCqRPhhJQFQWpzU7gwzC4kffHw3h+MTrDRzsx7j
3Svr0fmyfH2p1BjE0iMd8E5pbx0u97LrFi4+BVVQ2kqSIJmqXR9zCw6ImVs+OI/J
9Hh0rpSnMlQ7jY24bOSmQbPlXJtMV6mhAKmSEHNVw0QcNN9kYVEZJL4OTKImk8V/
jPcGbwKBgCaca14iHXujTFyI3840xPUz04ZrkLfpPdzrogk2QDt6iDICUlR8Ikga
JdpuQThKZLV61RICoNstASTKTHyzmlDDpKC+vjYibs75yvy6cjQBt6HOLwQZNcT5
H/w0o32h1+gTSGjXomlHdkf8Yh4LR5HxDVA/Z90HVNLNgC9n1T4J
-----END RSA PRIVATE KEY-----
database:
backend: bdb
connection_string: /opt/gocrack_server/storage.db
file_manager:
engine_file_path: /opt/gocrack_server/files/engine
task_file_path: /opt/gocrack_server/files/task
import_path: /opt/gocrack_server/files/import
temp_path: /opt/gocrack_server/files/temp
authentication:
backend: "database"

This should be kept a secret as it's used to sign the JWT's. Changing this will invalidate all created JWTs; forcing users to relogin.

secret_key: iAmAnIndependentStrongPassswordThatNeedsToBeSecure
backend_settings:
bcrypt_cost: 10
allow_registration: true
notifications:
email_server:
address: smtp.gmail.com
certificate: |
-----BEGIN CERTIFICATE-----

-----END CERTIFICATE-----
enabled: true
from_address: [email protected]
public_address: http://gocrack.password.crackers.local`

A couple of issues

Hello There,

I have gocrack up and running smoothly with a couple of issues, hopefully I could find answers here:

  1. I can't seem to upload big dictionary files (15 GB) despite adjusting the file manager's task_max_upload_size to the correct size of the uploaded file (15 * 1024 * 1024 * 1024) - upload stops at 18% every-time.

  2. There's an option in the server config allow_registration which I have set to false but despite that, the registration button and functionality in general is there and functional as if I have this option set to true.

  3. I have a user that I want to delete but apparently there's no straight-forward way to do that, I attempted to modify the .db flat database file directly but it requested a password which I can't seem to find.

Thanks for taking the time to look into this.

Gocrack for kali linux

Hi. Who can help me to install and configure gocrack on kali linux or on ubuntu. step by step.
I see examples on docs files, but how and where i must write this configs i dont know.

Docker `make build` fails

Theres a few of errors starting at:

docker run --rm --net=host -e USER_ID=1000 \
                -v /home/benc/go/src/github.com/fireeye/gocrack/docker/dist/hashcat:/out \
                gocrack/hashcat_shared
/bin/sh: 1: git: not found

Fixed by adding git to the dockerfile apt-get install.

Then:

docker run --rm --net=host -e USER_ID=1000 \
                -v /home/benc/go/src/github.com/fireeye/gocrack/docker/dist/hashcat:/out \
                gocrack/hashcat_shared
install -m 755 -d                                    /out/share/doc/hashcat
install -m 755 -d                                    /out/share/hashcat
gcc -c -pipe -std=gnu99 -Iinclude/ -Iinclude/lzma_sdk/ -IOpenCL/ -O2 -Ideps/OpenCL-Headers/ -DWITH_HWMON src/affinity.c -o obj/affinity.NATIVE.SHARED.o -fpic
gcc -c -pipe -std=gnu99 -Iinclude/ -Iinclude/lzma_sdk/ -IOpenCL/ -O2 -Ideps/OpenCL-Headers/ -DWITH_HWMON src/autotune.c -o obj/autotune.NATIVE.SHARED.o -fpic
gcc -c -pipe -std=gnu99 -Iinclude/ -Iinclude/lzma_sdk/ -IOpenCL/ -O2 -Ideps/OpenCL-Headers/ -DWITH_HWMON src/benchmark.c -o obj/benchmark.NATIVE.SHARED.o -fpic
install: cannot create directory '/out/share': Permission denied
gcc -c -pipe -std=gnu99 -Iinclude/ -Iinclude/lzma_sdk/ -IOpenCL/ -O2 -Ideps/OpenCL-Headers/ -DWITH_HWMON src/bitmap.c -o obj/bitmap.NATIVE.SHARED.o -fpic
src/Makefile:328: recipe for target 'install_docs' failed
make: *** [install_docs] Error 1
make: *** Waiting for unfinished jobs....
install: cannot create directory '/out/share': Permission denied
make: *** [install_shared] Error 1
src/Makefile:358: recipe for target 'install_shared' failed

Permissions on dist appear to be created with root ? Chowned that back to my user (1000).

I also get some additional errors but I think that is due to UMASK 027

Bug in Card picker

Hi,
when i select a GPU from one worker and then try to add another, all other workers with the same id appear to be selected as well (same GPU name, same ids just different machines).

card_picker

The Bug has no functional implication as picking workers from different machines is not implemented yet.

Feature Request: Windows Worker

I have multiple rigs that runs windows for compatibility.

it would be good to see

  1. a client for windows worker (if possible)
  2. a pre-command and post-command option for the worker , so my rigs can stop mining Zcash before a password recovery attempt and then start again after .

error when building on macos

make build
mkdir -p builds/
go build -tags """" -o builds/darwin/amd64/gocrack_worker -ldflags
"-X github.com/fireeye/gocrack/worker.CompileRev=1618023
-X github.com/fireeye/gocrack/worker.CompileTime=1509696556"
cmd/gocrack_worker/*.go
github.com/fireeye/gocrack/gocat
ld: library not found for -lhashcat
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [build] Error 2

but hashcat building seems right..
➜ hashcat-3.6.0 ./hashcat --opencl-info
hashcat () starting...

OpenCL Info:

Platform ID #1
Vendor : Apple
Name : Apple
Version : OpenCL 1.2 (Sep 6 2017 16:05:06)

Device ID #1
Type : CPU
Vendor ID : 4
Vendor : Intel
Name : Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Version : OpenCL 1.2
Processor(s) : 8
Clock : 2200
Memory : 4096/16384 MB allocatable
OpenCL Version : OpenCL C 1.2
Driver Version : 1.1

Device ID #2
Type : GPU
Vendor ID : 4
Vendor : Intel
Name : Iris Pro
Version : OpenCL 1.2
Processor(s) : 40
Clock : 1200
Memory : 384/1536 MB allocatable
OpenCL Version : OpenCL C 1.2
Driver Version : 1.2(Sep 29 2017 19:15:12)

Source 'make build' fails

Hello,

Trying to build from source on Ubuntu 18.04 with Hashcat 5.1.0 but getting the following error:

github.com/fireeye/gocat

In file included from /usr/local/include/hashcat/types.h:28:0,
from ./wrapper.h:5,
from ../gocat/gocat.go:9:
/usr/local/include/hashcat/ext_lzma.h:8:10: fatal error: LzmaDec.h: No such file or directory
#include <LzmaDec.h>

compilation terminated.
Makefile:14: recipe for target 'build' failed
make: *** [build] Error 2

So far I've built Hashcat in Shared mode and confirmed it works with my GPUs.

Any help would be greatly appreciated.

could not determine kind of name for C.EVENT_WEAK_HASH_* errors

Building fails with following errors. What i am missing here?

make build
mkdir -p builds/
go build -tags """" -o builds/linux/amd64/gocrack_worker -ldflags
"-X github.com/fireeye/gocrack/worker.CompileRev=dc14ad5
-X github.com/fireeye/gocrack/worker.CompileTime=1521450941
-X github.com/fireeye/gocrack/worker/engines/hashcat.HashcatVersion="
cmd/gocrack_worker/*.go
github.com/fireeye/gocrack/gocat
gocat/gocat.go:287:7: could not determine kind of name for C.EVENT_WEAK_HASH_ALL_CRACKED
gocat/gocat.go:231:7: could not determine kind of name for C.EVENT_WEAK_HASH_POST
gocat/gocat.go:229:7: could not determine kind of name for C.EVENT_WEAK_HASH_PRE
Makefile:14: recipe for target 'build' failed
make: *** [build] Error 2


Regards,
Allabert

docker make failed

Step 25/25 : CMD make BINDIR=/out
---> Running in 2714364cd641
---> c456a6ca3807
Removing intermediate container 2714364cd641
Successfully built c456a6ca3807
docker run --rm --net=host -e USER_ID=0
-v /root/gocrack-master/docker/dist/gocrack:/out
-v /src/github.com/fireeye/gocrack:/go/src/github.com/fireeye/gocrack
gocrack/build
make: *** No targets specified and no makefile found. Stop.
make: *** [gocrack] Error 2

Support for using GPUs from different nodes on one job

Hi,
I know it's a lot to ask but it would be great to have GPUs from different clients working on one job.

I know that the skip and limit parameters can be used to split up cracking jobs but finding the right split points will be tough. Two ideas would be:

  1. Bench the different systems and split the keyspace proportionately
  2. Break down the keyspace into slices (for example 10 minute aequivalents) and distirbute them round robin.

Both solutions would only work if the key space is deterministic , with makes working on larger maskfiles or rulesets + wordlists very complicated.

Also the splitting up of chunks is highly dependent on the hashtype (10 min MD5 vs 10 min Keepass)

problem with build gocrack

i have problems when build gocrack:

go build -tags """" -o builds/linux/amd64/gocrack_worker  -ldflags \
	"-X github.com/fireeye/gocrack/worker.CompileRev=e3b20e4 \
	 -X github.com/fireeye/gocrack/worker.CompileTime=1569172867 \
	 -X github.com/fireeye/gocrack/worker/engines/hashcat.HashcatVersion=" \
	cmd/gocrack_worker/*.go
# github.com/fireeye/gocat
../gocat/gocat.go:239:7: could not determine kind of name for C.EVENT_OPENCL_SESSION_POST
../gocat/gocat.go:237:7: could not determine kind of name for C.EVENT_OPENCL_SESSION_PRE
Makefile:14: recipe for target 'build' failed
make: *** [build] Error 2

Can`t find docker images

Hi! Im new to docker and gocrack. So I followed guides for docker images. But when I try to run gocrack/server or gocrack/worker docker says that repository does not exists. I run docker search, and also couldnt find it. Is it documention problem or mine? Can you help me?

Proposal: Move gocat to its own repository

I have been working on some changes to gocat to support v4 and now looking at v5 and I think it might be helpful to have a separate repository just for it. Any interest in pull it out similar to the UI repository?

bug/feat: support hashcat v4.0

@/gocrack $ make build

mkdir -p builds/
go build -tags """" -o builds/linux/amd64/gocrack_worker  -ldflags \
	"-X github.com/fireeye/gocrack/worker.CompileRev=1618023 \
	 -X github.com/fireeye/gocrack/worker.CompileTime=1509387780" \
	cmd/gocrack_worker/*.go
# github.com/fireeye/gocrack/gocat
../../../go/src/github.com/fireeye/gocrack/gocat/gocat.go:287:7: could not determine kind of name for C.EVENT_WEAK_HASH_ALL_CRACKED
../../../go/src/github.com/fireeye/gocrack/gocat/gocat.go:231:7: could not determine kind of name for C.EVENT_WEAK_HASH_POST
../../../go/src/github.com/fireeye/gocrack/gocat/gocat.go:229:7: could not determine kind of name for C.EVENT_WEAK_HASH_PRE
Makefile:14: recipe for target 'build' failed
make: *** [build] Error 2

@/hashcat-v4.0.0 $ hashcat64 --opencl-info

hashcat (v4.0.0) starting...

OpenCL Info:

Platform ID #1
  Vendor  : NVIDIA Corporation
  Name    : NVIDIA CUDA
  Version : OpenCL 1.2 CUDA 8.0.0

  Device ID #1
    Type           : GPU
    Vendor ID      : 32
    Vendor         : NVIDIA Corporation
    Name           : GeForce GTX 1080
    Version        : OpenCL 1.2 CUDA
    Processor(s)   : 20
    Clock          : 1733
    Memory         : 2028/8112 MB allocatable
    OpenCL Version : OpenCL C 1.2
    Driver Version : 375.82

Improve ssl certificate error reporting

When gocrack_server parses the configs/server.yaml config, it throws the same error when encountering issues with the ca certificate, child certificate, and email server certificate. This makes it difficult to troubleshoot certificate issues.

LDAP connection never closed

Hi, I noticed that the LDAP connection was never closed in ldap.go (Login method), thus resulting in connections not being performed after the TCP connection timed out on the LDAP server.

Adding a "defer s.Close()" worked for me.

Request: add screenshots to README

It would be great to see what the UI for this looks like without having to pull it down, configure, and spin it up.

Tasks

No tasks being tracked yet.

gocat memory issues with Hashcat 5.1

I am getting various memory issues attempting to integrate gocat with Hashcat 5.1. The most recent error is below.

malloc.c:2394: sysmalloc: Assertion (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.`

This occurs during the call to C.hashcat_get_status here.

The above error occurs if I try and call the GetStatus() method while the job is running. If I do not call this and wait for the job to finish, the following error pops up.

malloc(): memory corruption: 0x0000000006e32b60 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f5a5886b7e5] /lib/x86_64-linux-gnu/libc.so.6(+0x8213e)[0x7f5a5887613e] /lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x54)[0x7f5a58878184] /lib/x86_64-linux-gnu/libc.so.6(_IO_file_doallocate+0x55)[0x7f5a588611d5] /lib/x86_64-linux-gnu/libc.so.6(_IO_doallocbuf+0x34)[0x7f5a5886f594] /lib/x86_64-linux-gnu/libc.so.6(_IO_file_overflow+0x1c8)[0x7f5a5886e8f8] /lib/x86_64-linux-gnu/libc.so.6(_IO_file_xsputn+0xad)[0x7f5a5886d28d] /lib/x86_64-linux-gnu/libc.so.6(fwrite+0xdb)[0x7f5a588627bb] /usr/local/lib/libhashcat.so.5.1.0(dictstat_write+0xdc)[0x7f5a58dff6bc] /usr/local/lib/libhashcat.so.5.1.0(hashcat_session_execute+0xd7)[0x7f5a58e059e7]

I am at a bit of a loss as to where to look next. Any ideas or advice would be appreciated.

Default server config cors->allowed_origins parameter does not get parsed

Hi, I've successfully build gocrack, using go 1.9 on Ubuntu 16.04 and have created default configs for the server and worker in gocrack/build/linux/amd64/configs. However, when I run './gocrack_server' from amd64/ I get the following error:

{"time":"2017-11-03T17:34:13-04:00","level":"fatal","error":"web_server.cors.allowed_origins must contain one or more domains","message":"Failed to initialize server"}

I believe the issue is that the default config supplied in this repository defines 'api_server' instead of the expected 'web_server' listed in gocrack/server/config.go:18

Can not make worker container working

Hi everyone,

I'm writing this post cause I have an issue regarding the WORKER part of gocrack project.
I managed to make the SERVER part working, so I have the frontend part perfectly working and I can access the web interface easily.

Now I'm struggling with the worker container part. So I can access the worker via this command :
docker run -it
-e USER_ID=1000
-v "/tmp;/opt/gocrack"
gocrack/worker

I have go version 1.21.3 on my container. When I'm launching the command : $go run worker.go -config config.yaml
Almost all the package are properly installed, but at the end I have those errors :

worker.go:15:2: no required module provides package github.com/mandiant/gocrack/server; to add it:
go get github.com/mandiant/gocrack/server
worker/child/child.go:8:2: no required module provides package github.com/mandiant/gocrack/server/rpc; to add it:
go get github.com/mandiant/gocrack/server/rpc
worker/child/child.go:9:2: no required module provides package github.com/mandiant/gocrack/server/storage; to add it:
go get github.com/mandiant/gocrack/server/storage

When I try : $go get github.com/mandiant/gocrack/server or $go get github.com/mandiant/gocrack/server/rpc, I have this next error :

go: github.com/mandiant/gocrack/server/rpc: no matching versions for query "upgrade"

My go.mod file is correct and the thing I dont understand is that on the SERVER part when I launch it via go run server.go -config config.yaml, it is working and the package are the same in the code from server.go than worker.go, but with the server I dont have any problem.
Well I'm very new using GO so if someone could enlighten me I will be very grateful !

Running the server container - Error

When I run the docker run -it for the server I get the following error:
Adding user gocrack' ... Adding new group gocrack' (1000) ...
Adding new user gocrack' (1000) with group gocrack' ...
Creating home directory /home/gocrack' ... Copying files from /etc/skel' ...
{"time":"2018-06-22T17:58:34Z","level":"fatal","error":"file_manager.task_file_path has to be a valid, writable folder","message":"Failed to initialize server"}

I know task_file_path is from the config file and has a value: /opt/gocrack_server/files/task
Any help would be appreciated.

I have a question about the Priority function

when creating a task there is a option for priority. low(1 GPU) medium(2 GPU) and high(4 GPU). But what if one of your working station has 8 GPU is it also possible to run one task on all 8 GPU?

And is it possible to run 1 task on multiple workstation?

Docker `make build` fails

warning: current architecture ($dpkgArch) does not have a corresponding Go binary release; will be building from source"; echo >&2 ;; esac; url="https://golang.org/dl/go${GOLANG_VERSION}.${goRelArch}.tar.gz"; wget -O go.tgz "$url"; echo "${goRelSha256} *go.tgz" | sha256sum -c -; tar -C /usr/local -xzf go.tgz; rm go.tgz; if [ "$goRelArch" = 'src' ]; then echo >&2; echo >&2 'error: UNIMPLEMENTED'; echo >&2 'TODO install golang-any from jessie-backports for GOROOT_BOOTSTRAP (and uninstall after build)'; echo >&2; exit 1; fi; export PATH="/usr/local/go/bin:$PATH"; go version' returned a non-zero code: 4
Makefile:31: recipe for target 'gocrack' failed
make: *** [gocrack] Error 4

Feature Request - add timer for tasks

Hi,

It would be pretty convenient if we could set on timer on the password cracking tasks. So that multiple users don't have to wait for the previous tasks to end (which could be very long).

I'd be ready to contribute to the development of this feature if needed, you can contact me @jaybeehare on Twitter.

Operational efficiency issues and support username: hash

Why? When i Using the "gocrack" BUT it's significantly less efficient than The "hashcat".
Is my gocrack-configuration's question?

THX! That's my runing logs:
--------------------------------using hashcat --------------------------------------
Session ..........: hashcat
Status ...........: Exhausted
Hash.Type ........: MD5
Hash.Target ......: onlypass.txt
Time.Started .....: Mon Nov 6 15:36:34 2017 (2 mins, 10 secs)
Time.Estimated ...: Mon Nov 6 15:38:44 2017 (0 secs)
Guess.Base .......: File (onlydic.txt)
Guess.Queue ......: 1/1 (100.00%)
Speed.Dev. # 1 .....: 475.8 kH / s (7.84 ms)
Recovered ........: 3851155/8396914 (45.86%) Digests, 0/1 (0.00%) Salts
Recovered / Time ...: CUR: 2408655, N / A, N / A AVG: 1785572, 107134366, -2147483648 (Min, Hour, Day)
Progress .........: 56932171/56932171 (100.00%)
Rejected .........: 0/56932171 (0.00%)
Restore.Point ....: 56932171/56932171 (100.00%)
Candidates. # 1 ....: midas1342 -> drdjcgv
HWMon.Dev. # 1 .....: Temp: 33c Fan: 46% Util: 20% Core: 1139MHz Mem: 3304MHz Bus: 1
-------------------------------- using gocrack --------------------------------------
Time Started Mon Nov 6 14:50:50 2017
Time Estimated Mon Nov 6 22:05:24 2017 (6 hours, 32 mins)

In addition, hashcat uses the --username option to identify user and hash combinations like admin: e10adc3949ba59abbe56e057f20f883e.
gocrack how to support such a format?

Translate for Google

"Double free or corruption" Error

Has someone seen this problem before? I have fixed a lot of errors before but I can't find the solution to this one...
I attach a screenshot of the full output.

Output

Build fails with Go related errors

Hello,

When trying to build gocrack on Ubuntu 16.04.4 LTS with golang 1.6 installed i get following error:

user@ubuntu:~/Downloads/gocrack$ make build
mkdir -p builds/
go build -tags """" -o builds/linux/amd64/gocrack_worker -ldflags
"-X github.com/fireeye/gocrack/worker.CompileRev=71bd3e4
-X github.com/fireeye/gocrack/worker.CompileTime=1519829721
-X github.com/fireeye/gocrack/worker/engines/hashcat.HashcatVersion="
cmd/gocrack_worker/*.go
cmd/gocrack_worker/worker.go:14:2: cannot find package "github.com/fireeye/gocrack/shared" in any of:
/usr/lib/go-1.6/src/github.com/fireeye/gocrack/shared (from $GOROOT)
($GOPATH not set)
cmd/gocrack_worker/worker.go:15:2: cannot find package "github.com/fireeye/gocrack/worker" in any of:
/usr/lib/go-1.6/src/github.com/fireeye/gocrack/worker (from $GOROOT)
($GOPATH not set)
cmd/gocrack_worker/worker.go:16:2: cannot find package "github.com/fireeye/gocrack/worker/child" in any of:
/usr/lib/go-1.6/src/github.com/fireeye/gocrack/worker/child (from $GOROOT)
($GOPATH not set)
cmd/gocrack_worker/worker.go:17:2: cannot find package "github.com/fireeye/gocrack/worker/parent" in any of:
/usr/lib/go-1.6/src/github.com/fireeye/gocrack/worker/parent (from $GOROOT)
($GOPATH not set)
cmd/gocrack_worker/worker.go:19:2: cannot find package "github.com/rs/zerolog" in any of:
/usr/lib/go-1.6/src/github.com/rs/zerolog (from $GOROOT)
($GOPATH not set)
cmd/gocrack_worker/worker.go:20:2: cannot find package "github.com/rs/zerolog/log" in any of:
/usr/lib/go-1.6/src/github.com/rs/zerolog/log (from $GOROOT)
($GOPATH not set)
Makefile:14: recipe for target 'build' failed
make: *** [build] Error 1

I suspect it might be related to missing Go ENV variables but i cant figure out to what i would have to set them.

Regards,
allabert

Feature request: support for other hashcat modes

I don't believe gocrack currently supports any other mode beyond dictionary-from-file-with-rules, and bruteforce-masks.

Would be nice to see: dictionary-with-multiple-rules, dictionary-from-stdin-with-multiple-rules, markov-bruteforce, combinator, hybrid.

ERROR When building in Centos 7

cmd/gocrack_worker/worker.go:14:2: cannot find package "github.com/fireeye/gocrack/shared" in any of:
/usr/lib/golang/src/github.com/fireeye/gocrack/shared (from $GOROOT)
/home/mjw/go/src/github.com/fireeye/gocrack/shared (from $GOPATH)
cmd/gocrack_worker/worker.go:15:2: cannot find package "github.com/fireeye/gocrack/worker" in any of:
/usr/lib/golang/src/github.com/fireeye/gocrack/worker (from $GOROOT)
/home/mjw/go/src/github.com/fireeye/gocrack/worker (from $GOPATH)
cmd/gocrack_worker/worker.go:16:2: cannot find package "github.com/fireeye/gocrack/worker/child" in any of:
/usr/lib/golang/src/github.com/fireeye/gocrack/worker/child (from $GOROOT)
/home/mjw/go/src/github.com/fireeye/gocrack/worker/child (from $GOPATH)
cmd/gocrack_worker/worker.go:17:2: cannot find package "github.com/fireeye/gocrack/worker/parent" in any of:
/usr/lib/golang/src/github.com/fireeye/gocrack/worker/parent (from $GOROOT)
/home/mjw/go/src/github.com/fireeye/gocrack/worker/parent (from $GOPATH)
cmd/gocrack_worker/worker.go:19:2: cannot find package "github.com/rs/zerolog" in any of:
/usr/lib/golang/src/github.com/rs/zerolog (from $GOROOT)
/home/mjw/go/src/github.com/rs/zerolog (from $GOPATH)
cmd/gocrack_worker/worker.go:20:2: cannot find package "github.com/rs/zerolog/log" in any of:
/usr/lib/golang/src/github.com/rs/zerolog/log (from $GOROOT)
/home/mjw/go/src/github.com/rs/zerolog/log (from $GOPATH)

server/workmgr: Track Total Job Runtime

As an admin, I want the system to keep track of total runtime of a job so that we can potentially take action (stop the job) if it's not providing any value (no cracked passwords)

404s on every path except 'metrics'

Built with Go 1.10.1 and Hashcat 3.6.0 on Arch Linux. Everything appears to be working including worker authentication, except that I can't access the web interface itself:

gocrack_server log:

{"time":"2018-04-30T19:13:16+09:00","level":"info","addr":"[::]:1338","message":"HTTP Server listening"}
{"time":"2018-04-30T19:13:16+09:00","level":"info","addr":"[::]:1339","message":"RPC Server listening"}
{"time":"2018-04-30T19:13:42+09:00","level":"info","client_ip":"127.0.0.1","method":"POST","path":"/rpc/v1/beacon","status":200,"latency":"1.278765ms","message":"Processed HTTP 
Request"}
{"time":"2018-04-30T19:14:00+09:00","level":"info","client_ip":"153.222.[redacted]","method":"GET","path":"/","status":404,"latency":"402.028�s","message":"Processed HTTP Request"}
{"time":"2018-04-30T19:14:12+09:00","level":"info","client_ip":"127.0.0.1","method":"POST","path":"/rpc/v1/beacon","status":200,"latency":"950.842�s","message":"Processed HTTP 
Request"}
{"time":"2018-04-30T19:14:32+09:00","level":"info","client_ip":"153.222.[redacted]","method":"GET","path":"/metrics","status":200,"latency":"6.884966ms","message":"Processed HTTP 
Request"}
{"time":"2018-04-30T19:14:42+09:00","level":"info","client_ip":"127.0.0.1","method":"POST","path":"/rpc/v1/beacon","status":200,"latency":"408.585�s","message":"Processed HTTP 
Request"}
{"time":"2018-04-30T19:14:51+09:00","level":"info","client_ip":"153.222.[redacted]","method":"GET","path":"/","status":404,"latency":"460.473�s","message":"Processed HTTP Request"}

server.yaml

debug: true
web_server:
  listener:
    address: ":1338"
    ssl_enabled: false
  cors:
    allowed_origins:
        - "*"
  ui:
    csrf_key: [redacted]
    csrf_enabled: true
rpc_server:
  listener:
    address: ":1339"
    ssl_enabled: true
    ssl_ca_certificate: |
      -----BEGIN CERTIFICATE-----
      [redacted]
      -----END CERTIFICATE-----
    ssl_certificate: |
      -----BEGIN CERTIFICATE-----
     [redacted]
      -----END CERTIFICATE-----
    ssl_private_key: |
      -----BEGIN RSA PRIVATE KEY-----
      [redacted]
      -----END RSA PRIVATE KEY-----
database:
  backend: bdb
  connection_string: /home/oda/gocrack/server/database.db
file_manager:
  engine_file_path: /home/oda/gocrack/server/engine
  task_file_path: /home/oda/gocrack/server/task
  temp_path: /home/oda/gocrack/server/temp
  import_path: /home/oda/gocrack/server/import
authentication:
  backend: "database"
  secret_key: [redacted]
  backend_settings:
    bcrypt_cost: 10
    allow_registration: true
notifications:
  email_server:
    address: mail.teknik.io
  enabled: false
  from_address: [email protected]
  public_address: http://crack.tiuxo.com:1338

bug: "Stopping" State on task finish

When a task is stopping due to a user requesting the job to stop, the job will exit but the last status sent is still "stopping" instead of "stopped".

Gocrack crashing on task upload

Hi everyone,
I'm facing some strange issues with uploading task files to the gocrack.
I have test.txt files with next text inside
7C4A8D09CA3762AF61E59520943DC26494F8941B

While uploading it to the task list gocrack service crashing with next error in the Web interface

An unknown server error occured. Please contact your site administrator

and such output from the service in the console:

{"time":"2018-12-23T16:05:32+02:00","level":"info","client_ip":"x.x.x.x","method":"OPTIONS","path":"/api/v2/files/task/test.txt?engine=1&filetype=100","status":200,"latency":"714.213µs","message":"Processed HTTP Request"}
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7f6f93ad06a3]

runtime stack:
runtime.throw(0xc3a88b, 0x2a)
/usr/local/go/src/runtime/panic.go:605 +0x95
runtime.sigpanic()
/usr/local/go/src/runtime/signal_unix.go:351 +0x2b8

goroutine 39 [syscall, locked to thread]:
runtime.cgocall(0xa67d63, 0xc42048cfc8, 0xc42017c4b0)
/usr/local/go/src/runtime/cgocall.go:132 +0xe4 fp=0xc42048cf98 sp=0xc42048cf58 pc=0x4041a4
github.com/fireeye/gocrack/gocat._Cfunc_hashes_init_stage2(0xc42017c4b0, 0xc400000000)
github.com/fireeye/gocrack/gocat/_obj/_cgo_gotypes.go:1538 +0x49 fp=0xc42048cfc8 sp=0xc42048cf98 pc=0x9d5c49
github.com/fireeye/gocrack/gocat.ValidateHashes.func6(0xc42017c4b0, 0x0)
/go/src/github.com/fireeye/gocrack/gocat/validator.go:66 +0xa4 fp=0xc42048d008 sp=0xc42048cfc8 pc=0x9dce94
github.com/fireeye/gocrack/gocat.ValidateHashes(0xc420062480, 0x54, 0x64, 0x0, 0x0, 0x0)
/go/src/github.com/fireeye/gocrack/gocat/validator.go:66 +0x4ee fp=0xc42048d228 sp=0xc42048d008 pc=0x9db56e
github.com/fireeye/gocrack/server/web.(*Server).webUploadTaskFile(0xc4201d3130, 0xc42028a000, 0x0)
/go/src/github.com/fireeye/gocrack/server/web/file_management_task.go:155 +0x9d1 fp=0xc42048d468 sp=0xc42048d228 pc=0xa02881
github.com/fireeye/gocrack/server/web.(*Server).(github.com/fireeye/gocrack/server/web.webUploadTaskFile)-fm(0xc42028a000, 0x44cd08)
/go/src/github.com/fireeye/gocrack/server/web/server.go:153 +0x34 fp=0xc42048d490 sp=0xc42048d468 pc=0xa13834
github.com/fireeye/gocrack/server/web.WrapAPIForError.func1(0xc42028a000)
/go/src/github.com/fireeye/gocrack/server/web/server.go:81 +0x33 fp=0xc42048d4d8 sp=0xc42048d490 pc=0xa12243
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc42028a000)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/context.go:111 +0x43 fp=0xc42048d4f8 sp=0xc42048d4d8 pc=0x9024e3
github.com/fireeye/gocrack/shared.RecordAPIMetrics.func1(0xc42028a000)
/go/src/github.com/fireeye/gocrack/shared/http_server_metrics.go:18 +0x99 fp=0xc42048d608 sp=0xc42048d4f8 pc=0x948749
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc42028a000)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/context.go:111 +0x43 fp=0xc42048d628 sp=0xc42048d608 pc=0x9024e3
github.com/fireeye/gocrack/server/web.setXSRFTokenIfNecessary.func1(0xc42028a000)
/go/src/github.com/fireeye/gocrack/server/web/middlewares.go:94 +0x1bc fp=0xc42048d708 sp=0xc42048d628 pc=0xa11cac
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc42028a000)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/context.go:111 +0x43 fp=0xc42048d728 sp=0xc42048d708 pc=0x9024e3
github.com/fireeye/gocrack/server/web.(*Server).requestHasValidAuth.func1(0xc42028a000)
/go/src/github.com/fireeye/gocrack/server/web/auth.go:69 +0x40a fp=0xc42048d7d8 sp=0xc42048d728 pc=0xa10c0a
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc42028a000)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/context.go:111 +0x43 fp=0xc42048d7f8 sp=0xc42048d7d8 pc=0x9024e3
github.com/fireeye/gocrack/shared.RecordAPIMetrics.func1(0xc42028a000)
/go/src/github.com/fireeye/gocrack/shared/http_server_metrics.go:18 +0x99 fp=0xc42048d908 sp=0xc42048d7f8 pc=0x948749
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc42028a000)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/context.go:111 +0x43 fp=0xc42048d928 sp=0xc42048d908 pc=0x9024e3
github.com/fireeye/gocrack/vendor/github.com/tankbusta/gzip.Gzip.func2(0xc42028a000)
/go/src/github.com/fireeye/gocrack/vendor/github.com/tankbusta/gzip/gzip.go:47 +0x216 fp=0xc42048d980 sp=0xc42048d928 pc=0x9ce3a6
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc42028a000)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/context.go:111 +0x43 fp=0xc42048d9a0 sp=0xc42048d980 pc=0x9024e3
github.com/fireeye/gocrack/shared/ginlog.LogRequests.func1(0xc42028a000)
/go/src/github.com/fireeye/gocrack/shared/ginlog/ginlog.go:16 +0xfc fp=0xc42048da80 sp=0xc42048d9a0 pc=0x9cd7dc
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc42028a000)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/context.go:111 +0x43 fp=0xc42048daa0 sp=0xc42048da80 pc=0x9024e3
github.com/fireeye/gocrack/server/web.setSecureHeaders.func1(0xc42028a000)
/go/src/github.com/fireeye/gocrack/server/web/middlewares.go:60 +0xd7 fp=0xc42048dad8 sp=0xc42048daa0 pc=0xa11ad7
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc42028a000)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/context.go:111 +0x43 fp=0xc42048daf8 sp=0xc42048dad8 pc=0x9024e3
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.RecoveryWithWriter.func1(0xc42028a000)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/recovery.go:45 +0x5a fp=0xc42048db28 sp=0xc42048daf8 pc=0x91365a
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc42028a000)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/context.go:111 +0x43 fp=0xc42048db48 sp=0xc42048db28 pc=0x9024e3
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc420276480, 0xc42028a000)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/gin.go:339 +0x5ba fp=0xc42048dc50 sp=0xc42048db48 pc=0x90b1fa
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc420276480, 0x11f2b80, 0xc4202482a0, 0xc420118400)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/gin.go:303 +0x16b fp=0xc42048dc88 sp=0xc42048dc50 pc=0x90a98b
github.com/fireeye/gocrack/vendor/github.com/gorilla/csrf.(*csrf).ServeHTTP(0xc42026c140, 0x11f2b80, 0xc4202482a0, 0xc420118200)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gorilla/csrf/csrf.go:267 +0x323 fp=0xc42048dd18 sp=0xc42048dc88 pc=0x9e7123
net/http.serverHandler.ServeHTTP(0xc4202088f0, 0x11f2b80, 0xc4202482a0, 0xc420118600)
/usr/local/go/src/net/http/server.go:2619 +0xb4 fp=0xc42048dd48 sp=0xc42048dd18 pc=0x6fa984
net/http.(*conn).serve(0xc42018a0a0, 0x11f3a80, 0xc4201a0600)
/usr/local/go/src/net/http/server.go:1801 +0x71d fp=0xc42048dfc8 sp=0xc42048dd48 pc=0x6f6a6d
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2337 +0x1 fp=0xc42048dfd0 sp=0xc42048dfc8 pc=0x45ba31
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2720 +0x288

goroutine 1 [chan receive]:
main.main()
/go/src/github.com/fireeye/gocrack/cmd/gocrack_server/server.go:81 +0x2a9

goroutine 19 [syscall]:
os/signal.signal_recv(0x0)
/usr/local/go/src/runtime/sigqueue.go:131 +0xa6
os/signal.loop()
/usr/local/go/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.0
/usr/local/go/src/os/signal/signal_unix.go:28 +0x41

goroutine 34 [chan receive]:
main.main.func2(0xc420240f60, 0xc4201a1140)
/go/src/github.com/fireeye/gocrack/cmd/gocrack_server/server.go:69 +0x31
created by main.main
/go/src/github.com/fireeye/gocrack/cmd/gocrack_server/server.go:66 +0x1cc

goroutine 33 [select, locked to thread]:
runtime.gopark(0xc4cea8, 0x0, 0xc20d85, 0x6, 0x18, 0x1)
/usr/local/go/src/runtime/proc.go:287 +0x12c
runtime.selectgo(0xc420036f50, 0xc420062780)
/usr/local/go/src/runtime/select.go:395 +0x1149
runtime.ensureSigM.func1()
/usr/local/go/src/runtime/signal_unix.go:511 +0x220
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2337 +0x1

goroutine 32 [select]:
github.com/fireeye/gocrack/server.(*Server).Start(0xc4201a1140, 0x0, 0x0)
/go/src/github.com/fireeye/gocrack/server/server.go:173 +0x384
main.main.func1(0xc4201a1140)
/go/src/github.com/fireeye/gocrack/cmd/gocrack_server/server.go:56 +0x2f
created by main.main
/go/src/github.com/fireeye/gocrack/cmd/gocrack_server/server.go:55 +0xf0

goroutine 9 [select]:
github.com/fireeye/gocrack/server/notifications.(*CacheLastPasswordSent).cleanup(0xc420278520)
/go/src/github.com/fireeye/gocrack/server/notifications/cache.go:40 +0x22b
created by github.com/fireeye/gocrack/server/notifications.NewCache
/go/src/github.com/fireeye/gocrack/server/notifications/cache.go:27 +0x114

goroutine 10 [IO wait]:
internal/poll.runtime_pollWait(0x7f6f9410af70, 0x72, 0xffffffffffffffff)
/usr/local/go/src/runtime/netpoll.go:173 +0x57
internal/poll.(*pollDesc).wait(0xc4201d4318, 0x72, 0xc420038c00, 0x0, 0x0)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0xae
internal/poll.(*pollDesc).waitRead(0xc4201d4318, 0xffffffffffffff00, 0x0, 0x0)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Accept(0xc4201d4300, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/internal/poll/fd_unix.go:335 +0x1e2
net.(*netFD).accept(0xc4201d4300, 0xc4cf60, 0xc420038df8, 0xfc0000c420056bc0)
/usr/local/go/src/net/fd_unix.go:238 +0x42
net.(*TCPListener).accept(0xc42000e090, 0x403cdb, 0xc420038e00, 0x403c81)
/usr/local/go/src/net/tcpsock_posix.go:136 +0x2e
net.(*TCPListener).Accept(0xc42000e090, 0x43654b, 0xc420038e38, 0x6fade8, 0x458170)
/usr/local/go/src/net/tcpsock.go:247 +0x49
crypto/tls.(*listener).Accept(0xc42000de00, 0xc4c8c0, 0xc42026c280, 0x11f3b40, 0xc4201d1ec0)
/usr/local/go/src/crypto/tls/tls.go:52 +0x37
net/http.(*Server).Serve(0xc420208820, 0x11f2300, 0xc42000de00, 0x0, 0x0)
/usr/local/go/src/net/http/server.go:2695 +0x1b2
github.com/fireeye/gocrack/server/rpc.(*RPCServer).Start(0xc4201d4380, 0xc2a572, 0x14)
/go/src/github.com/fireeye/gocrack/server/rpc/rpc_server.go:90 +0x41
github.com/fireeye/gocrack/server.(*Server).Start.func1(0xc4201a1140, 0xc4201d4380, 0xc42027a900)
/go/src/github.com/fireeye/gocrack/server/server.go:148 +0xd3
created by github.com/fireeye/gocrack/server.(*Server).Start
/go/src/github.com/fireeye/gocrack/server/server.go:144 +0x264

goroutine 11 [IO wait]:
internal/poll.runtime_pollWait(0x7f6f9410aeb0, 0x72, 0xffffffffffffffff)
/usr/local/go/src/runtime/netpoll.go:173 +0x57
internal/poll.(*pollDesc).wait(0xc4201d4418, 0x72, 0xc42038cc00, 0x0, 0x0)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0xae
internal/poll.(*pollDesc).waitRead(0xc4201d4418, 0xffffffffffffff00, 0x0, 0x0)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Accept(0xc4201d4400, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/internal/poll/fd_unix.go:335 +0x1e2
net.(*netFD).accept(0xc4201d4400, 0xc42038ce30, 0x402a77, 0xc42008c080)
/usr/local/go/src/net/fd_unix.go:238 +0x42
net.(*TCPListener).accept(0xc42000e100, 0x6fade8, 0x458170, 0xc42038ce78)
/usr/local/go/src/net/tcpsock_posix.go:136 +0x2e
net.(*TCPListener).Accept(0xc42000e100, 0xc4c8c0, 0xc42008c000, 0x11f3b40, 0xc4201d1e00)
/usr/local/go/src/net/tcpsock.go:247 +0x49
net/http.(*Server).Serve(0xc4202088f0, 0x11f2900, 0xc42000e100, 0x0, 0x0)
/usr/local/go/src/net/http/server.go:2695 +0x1b2
github.com/fireeye/gocrack/server/web.(*Server).Start(0xc4201d3130, 0xc2b155, 0x15)
/go/src/github.com/fireeye/gocrack/server/web/api.go:62 +0x41
github.com/fireeye/gocrack/server.(*Server).Start.func2(0xc4201a1140, 0xc4201d3130, 0xc42027a900)
/go/src/github.com/fireeye/gocrack/server/server.go:162 +0xd3
created by github.com/fireeye/gocrack/server.(*Server).Start
/go/src/github.com/fireeye/gocrack/server/server.go:158 +0x2a3

goroutine 12 [IO wait]:
internal/poll.runtime_pollWait(0x7f6f9410adf0, 0x72, 0x0)
/usr/local/go/src/runtime/netpoll.go:173 +0x57
internal/poll.(*pollDesc).wait(0xc4201d4598, 0x72, 0xffffffffffffff00, 0x11eed80, 0x11e9bc0)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0xae
internal/poll.(*pollDesc).waitRead(0xc4201d4598, 0xc420296800, 0x800, 0x800)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc4201d4580, 0xc420296800, 0x800, 0x800, 0x0, 0x0, 0x0)
/usr/local/go/src/internal/poll/fd_unix.go:126 +0x18a
net.(*netFD).Read(0xc4201d4580, 0xc420296800, 0x800, 0x800, 0x101, 0x7fb, 0x413e56)
/usr/local/go/src/net/fd_unix.go:202 +0x52
net.(*conn).Read(0xc42000e368, 0xc420296800, 0x800, 0x800, 0x0, 0x0, 0x0)
/usr/local/go/src/net/net.go:176 +0x6d
crypto/tls.(*block).readFromUntil(0xc4201d1fb0, 0x7f6f940ca120, 0xc42000e368, 0x5, 0xc42000e368, 0x30)
/usr/local/go/src/crypto/tls/conn.go:488 +0x95
crypto/tls.(*Conn).readRecord(0xc42002d500, 0xc4cf17, 0xc42002d620, 0xc42004db00)
/usr/local/go/src/crypto/tls/conn.go:590 +0xe0
crypto/tls.(*Conn).Read(0xc42002d500, 0xc420299000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/go/src/crypto/tls/conn.go:1134 +0x110
net/http.(*connReader).Read(0xc420286360, 0xc420299000, 0x1000, 0x1000, 0xc42004dbc0, 0x44cd08, 0x41cda2e8010)
/usr/local/go/src/net/http/server.go:753 +0x105
bufio.(*Reader).fill(0xc42027ac00)
/usr/local/go/src/bufio/bufio.go:97 +0x11a
bufio.(*Reader).Peek(0xc42027ac00, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/bufio/bufio.go:129 +0x3a
net/http.(*conn).readRequest(0xc42026c280, 0x11f3a80, 0xc420056ec0, 0x0, 0x0, 0x0)
/usr/local/go/src/net/http/server.go:930 +0xc77
net/http.(*conn).serve(0xc42026c280, 0x11f3a80, 0xc420056ec0)
/usr/local/go/src/net/http/server.go:1739 +0x50e
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2720 +0x288

goroutine 50 [select]:
github.com/fireeye/gocrack/server/web.(*RealtimeServer).ServeStream.func2(0xc420058840, 0x11f3a80, 0xc4200762c0, 0xc420076300, 0x11f7d20, 0xc4200bac60, 0x7f6f940ca8d0, 0xc4200bac60)
/go/src/github.com/fireeye/gocrack/server/web/sse_endpoint.go:228 +0x160
created by github.com/fireeye/gocrack/server/web.(*RealtimeServer).ServeStream
/go/src/github.com/fireeye/gocrack/server/web/sse_endpoint.go:224 +0x4e9

goroutine 36 [select]:
github.com/fireeye/gocrack/server/web.(*RealtimeServer).ServeStream(0xc420058840, 0xc4200bac60)
/go/src/github.com/fireeye/gocrack/server/web/sse_endpoint.go:244 +0x6a9
github.com/fireeye/gocrack/server/web.(*RealtimeServer).ServeStream-fm(0xc4200bac60)
/go/src/github.com/fireeye/gocrack/server/web/server.go:170 +0x34
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc4200bac60)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/context.go:111 +0x43
github.com/fireeye/gocrack/server/web.(*Server).requestHasValidAuth.func1(0xc4200bac60)
/go/src/github.com/fireeye/gocrack/server/web/auth.go:69 +0x40a
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc4200bac60)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/context.go:111 +0x43
github.com/fireeye/gocrack/shared.RecordAPIMetrics.func1(0xc4200bac60)
/go/src/github.com/fireeye/gocrack/shared/http_server_metrics.go:18 +0x99
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc4200bac60)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/context.go:111 +0x43
github.com/fireeye/gocrack/server/web.setXSRFTokenIfNecessary.func1(0xc4200bac60)
/go/src/github.com/fireeye/gocrack/server/web/middlewares.go:94 +0x1bc
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc4200bac60)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/context.go:111 +0x43
github.com/fireeye/gocrack/server/web.(*Server).requestHasValidAuth.func1(0xc4200bac60)
/go/src/github.com/fireeye/gocrack/server/web/auth.go:69 +0x40a
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc4200bac60)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/context.go:111 +0x43
github.com/fireeye/gocrack/shared.RecordAPIMetrics.func1(0xc4200bac60)
/go/src/github.com/fireeye/gocrack/shared/http_server_metrics.go:18 +0x99
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc4200bac60)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/context.go:111 +0x43
github.com/fireeye/gocrack/shared/ginlog.LogRequests.func1(0xc4200bac60)
/go/src/github.com/fireeye/gocrack/shared/ginlog/ginlog.go:16 +0xfc
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc4200bac60)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/context.go:111 +0x43
github.com/fireeye/gocrack/server/web.setSecureHeaders.func1(0xc4200bac60)
/go/src/github.com/fireeye/gocrack/server/web/middlewares.go:60 +0xd7
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc4200bac60)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/context.go:111 +0x43
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.RecoveryWithWriter.func1(0xc4200bac60)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/recovery.go:45 +0x5a
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.(*Context).Next(0xc4200bac60)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/context.go:111 +0x43
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc420276480, 0xc4200bac60)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/gin.go:339 +0x5ba
github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc420276480, 0x11f2b80, 0xc4202481c0, 0xc420118300)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gin-gonic/gin/gin.go:303 +0x16b
github.com/fireeye/gocrack/vendor/github.com/gorilla/csrf.(*csrf).ServeHTTP(0xc42026c140, 0x11f2b80, 0xc4202481c0, 0xc420118200)
/go/src/github.com/fireeye/gocrack/vendor/github.com/gorilla/csrf/csrf.go:267 +0x323
net/http.serverHandler.ServeHTTP(0xc4202088f0, 0x11f2b80, 0xc4202481c0, 0xc420118100)
/usr/local/go/src/net/http/server.go:2619 +0xb4
net/http.(*conn).serve(0xc42018bc20, 0x11f3a80, 0xc4201a1400)
/usr/local/go/src/net/http/server.go:1801 +0x71d
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2720 +0x288

goroutine 16 [IO wait]:
internal/poll.runtime_pollWait(0x7f6f9410ad30, 0x72, 0x0)
/usr/local/go/src/runtime/netpoll.go:173 +0x57
internal/poll.(*pollDesc).wait(0xc42009f698, 0x72, 0xffffffffffffff00, 0x11eed80, 0x11e9bc0)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0xae
internal/poll.(*pollDesc).waitRead(0xc42009f698, 0xc420203a00, 0x1, 0x1)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc42009f680, 0xc420203a51, 0x1, 0x1, 0x0, 0x0, 0x0)
/usr/local/go/src/internal/poll/fd_unix.go:126 +0x18a
net.(*netFD).Read(0xc42009f680, 0xc420203a51, 0x1, 0x1, 0xc4202411a0, 0x0, 0xc4201a14e8)
/usr/local/go/src/net/fd_unix.go:202 +0x52
net.(*conn).Read(0xc420072658, 0xc420203a51, 0x1, 0x1, 0x0, 0x0, 0x0)
/usr/local/go/src/net/net.go:176 +0x6d
net/http.(*connReader).backgroundRead(0xc420203a40)
/usr/local/go/src/net/http/server.go:660 +0x62
created by net/http.(*connReader).startBackgroundRead
/usr/local/go/src/net/http/server.go:656 +0xd8

goroutine 52 [IO wait]:
internal/poll.runtime_pollWait(0x7f6f9410aaf0, 0x72, 0x0)
/usr/local/go/src/runtime/netpoll.go:173 +0x57
internal/poll.(*pollDesc).wait(0xc42009e098, 0x72, 0xffffffffffffff00, 0x11eed80, 0x11e9bc0)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0xae
internal/poll.(*pollDesc).waitRead(0xc42009e098, 0xc42013a000, 0x1000, 0x1000)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc42009e080, 0xc42013a000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/go/src/internal/poll/fd_unix.go:126 +0x18a
net.(*netFD).Read(0xc42009e080, 0xc42013a000, 0x1000, 0x1000, 0xc42003b8c8, 0x6f100b, 0xb927e0)
/usr/local/go/src/net/fd_unix.go:202 +0x52
net.(*conn).Read(0xc420072018, 0xc42013a000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/go/src/net/net.go:176 +0x6d
net/http.(*connReader).Read(0xc420068450, 0xc42013a000, 0x1000, 0x1000, 0xc, 0x3, 0x0)
/usr/local/go/src/net/http/server.go:753 +0x105
bufio.(*Reader).fill(0xc420240060)
/usr/local/go/src/bufio/bufio.go:97 +0x11a
bufio.(*Reader).ReadSlice(0xc420240060, 0xc42003ba0a, 0x412996, 0x7f6f9416d998, 0x0, 0xc42003bab8, 0x412e27)
/usr/local/go/src/bufio/bufio.go:338 +0x2c
bufio.(*Reader).ReadLine(0xc420240060, 0x100, 0xf8, 0xc07920, 0x1, 0x122002002c700, 0xf8)
/usr/local/go/src/bufio/bufio.go:367 +0x34
net/textproto.(*Reader).readLineSlice(0xc420068480, 0xc42003bb20, 0xc42003bb20, 0x413588, 0x100, 0xc07920)
/usr/local/go/src/net/textproto/reader.go:55 +0x70
net/textproto.(*Reader).ReadLine(0xc420068480, 0xc420118000, 0x0, 0xc42003bb90, 0x492712)
/usr/local/go/src/net/textproto/reader.go:36 +0x2b
net/http.readRequest(0xc420240060, 0x0, 0xc420118000, 0x0, 0x0)
/usr/local/go/src/net/http/request.go:925 +0x99
net/http.(*conn).readRequest(0xc42008c000, 0x11f3a80, 0xc420076080, 0x0, 0x0, 0x0)
/usr/local/go/src/net/http/server.go:933 +0x17c
net/http.(*conn).serve(0xc42008c000, 0x11f3a80, 0xc420076080)
/usr/local/go/src/net/http/server.go:1739 +0x50e
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2720 +0x288

goroutine 53 [IO wait]:
internal/poll.runtime_pollWait(0x7f6f9410ac70, 0x72, 0x0)
/usr/local/go/src/runtime/netpoll.go:173 +0x57
internal/poll.(*pollDesc).wait(0xc4201d4018, 0x72, 0xffffffffffffff00, 0x11eed80, 0x11e9bc0)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0xae
internal/poll.(*pollDesc).waitRead(0xc4201d4018, 0xc420198300, 0x1, 0x1)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc4201d4000, 0xc420198371, 0x1, 0x1, 0x0, 0x0, 0x0)
/usr/local/go/src/internal/poll/fd_unix.go:126 +0x18a
net.(*netFD).Read(0xc4201d4000, 0xc420198371, 0x1, 0x1, 0xc420082360, 0x0, 0x11ec701)
/usr/local/go/src/net/fd_unix.go:202 +0x52
net.(*conn).Read(0xc42000e008, 0xc420198371, 0x1, 0x1, 0x0, 0x0, 0x0)
/usr/local/go/src/net/net.go:176 +0x6d
net/http.(*connReader).backgroundRead(0xc420198360)
/usr/local/go/src/net/http/server.go:660 +0x62
created by net/http.(*connReader).startBackgroundRead
/usr/local/go/src/net/http/server.go:656 +0xd8

goroutine 43 [IO wait]:
internal/poll.runtime_pollWait(0x7f6f9410abb0, 0x72, 0x0)
/usr/local/go/src/runtime/netpoll.go:173 +0x57
internal/poll.(*pollDesc).wait(0xc4201d4118, 0x72, 0xffffffffffffff00, 0x11eed80, 0x11e9bc0)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0xae
internal/poll.(*pollDesc).waitRead(0xc4201d4118, 0xc420298000, 0x1000, 0x1000)
/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc4201d4100, 0xc420298000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/go/src/internal/poll/fd_unix.go:126 +0x18a
net.(*netFD).Read(0xc4201d4100, 0xc420298000, 0x1000, 0x1000, 0xc42038e8c8, 0x6f0fda, 0xc420198518)
/usr/local/go/src/net/fd_unix.go:202 +0x52
net.(*conn).Read(0xc42000e038, 0xc420298000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/go/src/net/net.go:176 +0x6d
net/http.(*connReader).Read(0xc420198510, 0xc420298000, 0x1000, 0x1000, 0xc4201a0800, 0x11e97b2, 0x2)
/usr/local/go/src/net/http/server.go:753 +0x105
bufio.(*Reader).fill(0xc4200580c0)
/usr/local/go/src/bufio/bufio.go:97 +0x11a
bufio.(*Reader).ReadSlice(0xc4200580c0, 0xc42038ea0a, 0x7fffc1764c52, 0xc42038ea38, 0x300000002, 0x0, 0x0)
/usr/local/go/src/bufio/bufio.go:338 +0x2c
bufio.(*Reader).ReadLine(0xc4200580c0, 0x100, 0xf8, 0xc07920, 0xc42038ea98, 0x220000403bd9, 0xf8)
/usr/local/go/src/bufio/bufio.go:367 +0x34
net/textproto.(*Reader).readLineSlice(0xc420198690, 0xc42038eb20, 0xc42038eb20, 0x413588, 0x100, 0xc07920)
/usr/local/go/src/net/textproto/reader.go:55 +0x70
net/textproto.(*Reader).ReadLine(0xc420198690, 0xc4201dee00, 0x0, 0xc42038eb90, 0x492712)
/usr/local/go/src/net/textproto/reader.go:36 +0x2b
net/http.readRequest(0xc4200580c0, 0x0, 0xc4201dee00, 0x0, 0x0)
/usr/local/go/src/net/http/request.go:925 +0x99
net/http.(*conn).readRequest(0xc42018a1e0, 0x11f3a80, 0xc4201a0740, 0x0, 0x0, 0x0)
/usr/local/go/src/net/http/server.go:933 +0x17c
net/http.(*conn).serve(0xc42018a1e0, 0x11f3a80, 0xc4201a0740)
/usr/local/go/src/net/http/server.go:1739 +0x50e
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2720 +0x288

PS: Folder permissions set to 777 for:
task
temp
engine
import

task file is uploading succesfully to the server file system.

Althought there are no issues with upload of the dictionary files.

PotfilePath never used

Hi,

I'm playing with the tool and I think it has a "bug" with the potfiles, you can define a PotfilePath on the worker's settings, but it doesn't work.

I search on the code and it never uses that configuration variable, and not only that it set the hashcat PotfileDisable flag to true.

I'm trying to set the PotfilePath to a valid path on the following file and commenting the PotfileDisable, but it doesn't work anyways, any help with this?

https://github.com/fireeye/gocrack/blob/161802383469954323dc2ad88c63b8af2a463aeb/worker/engines/hashcat/hashcat_engine.go#L170

sorting cracked passwords by "cracked_at" yields unexpected results

If you're on the Cracked Passwords page for a Task and try to sort the passwords via the cracked_at column, the results will be incorrect. This is caused by the boltdb/storm storage backend as the data is stored as JSON. Storm doesn't have the concept of ordering by time.Time objects that come out after a document is decoded

make build failed in folder docker

Hi all,

When I tried to build the docker image, I got the following error:

[/root/go/src/github.com/fireeye/gocrack/docker] git:(master) $ make build
... 
Step 23/25 : USER build
 ---> Using cache
 ---> 85bd76fcf9e4
Step 24/25 : ENV HASHCAT_VER=$HASHCAT_VER
 ---> Using cache
 ---> f32c0b8e3490
Step 25/25 : CMD ["make", "BINDIR=/out"]
 ---> Using cache
 ---> afdd50e37e48
Successfully built afdd50e37e48
Successfully tagged gocrack/build:latest
docker run --rm --net=host -e USER_ID=0 \
                -v /root/go/src/github.com/fireeye/gocrack/docker/dist/gocrack:/out \
                -v /root/go/src/github.com/fireeye/gocrack:/go/src/github.com/fireeye/gocrack \
                gocrack/build
mkdir -p builds/
go build -tags """" -o /out/gocrack_worker  -ldflags \
        "-X github.com/fireeye/gocrack/worker.CompileRev=bd43069 \
         -X github.com/fireeye/gocrack/worker.CompileTime=1644844402 \
         -X github.com/fireeye/gocrack/worker/engines/hashcat.HashcatVersion=v5.1.0" \
        cmd/gocrack_worker/*.go
worker/engines/hashcat/hashcat_engine.go:10:2: cannot find package "github.com/fireeye/gocat" in any of:
        /usr/local/go/src/github.com/fireeye/gocat (from $GOROOT)
        /go/src/github.com/fireeye/gocat (from $GOPATH)
worker/engines/hashcat/hashcat_engine.go:11:2: cannot find package "github.com/fireeye/gocat/hcargp" in any of:
        /usr/local/go/src/github.com/fireeye/gocat/hcargp (from $GOROOT)
        /go/src/github.com/fireeye/gocat/hcargp (from $GOPATH)
worker/engines/hashcat/hashcat_engine.go:12:2: cannot find package "github.com/fireeye/gocat/restoreutil" in any of:
        /usr/local/go/src/github.com/fireeye/gocat/restoreutil (from $GOROOT)
        /go/src/github.com/fireeye/gocat/restoreutil (from $GOPATH)
shared/http_server_metrics.go:9:2: cannot find package "github.com/gin-gonic/gin" in any of:
        /usr/local/go/src/github.com/gin-gonic/gin (from $GOROOT)
        /go/src/github.com/gin-gonic/gin (from $GOPATH)
worker/child/file_helpers.go:10:2: cannot find package "github.com/nightlyone/lockfile" in any of:
        /usr/local/go/src/github.com/nightlyone/lockfile (from $GOROOT)
        /go/src/github.com/nightlyone/lockfile (from $GOPATH)
shared/http_server_metrics.go:10:2: cannot find package "github.com/prometheus/client_golang/prometheus" in any of:
        /usr/local/go/src/github.com/prometheus/client_golang/prometheus (from $GOROOT)
        /go/src/github.com/prometheus/client_golang/prometheus (from $GOPATH)
cmd/gocrack_worker/worker.go:19:2: cannot find package "github.com/rs/zerolog" in any of:
        /usr/local/go/src/github.com/rs/zerolog (from $GOROOT)
        /go/src/github.com/rs/zerolog (from $GOPATH)
shared/ginlog/ginlog.go:7:2: cannot find package "github.com/rs/zerolog/log" in any of:
        /usr/local/go/src/github.com/rs/zerolog/log (from $GOROOT)
        /go/src/github.com/rs/zerolog/log (from $GOPATH)
worker/parent/mule_manager.go:15:2: cannot find package "github.com/shirou/gopsutil/process" in any of:
        /usr/local/go/src/github.com/shirou/gopsutil/process (from $GOROOT)
        /go/src/github.com/shirou/gopsutil/process (from $GOPATH)
server/rpc/rpc_server.go:17:2: cannot find package "github.com/tankbusta/gzip" in any of:
        /usr/local/go/src/github.com/tankbusta/gzip (from $GOROOT)
        /go/src/github.com/tankbusta/gzip (from $GOPATH)
server/workmgr/workmgr.go:10:2: cannot find package "github.com/tchap/go-exchange/exchange" in any of:
        /usr/local/go/src/github.com/tchap/go-exchange/exchange (from $GOROOT)
        /go/src/github.com/tchap/go-exchange/exchange (from $GOPATH)
shared/config_helper.go:6:2: cannot find package "gopkg.in/yaml.v2" in any of:
        /usr/local/go/src/gopkg.in/yaml.v2 (from $GOROOT)
        /go/src/gopkg.in/yaml.v2 (from $GOPATH)
Makefile:14: recipe for target 'build' failed
make: *** [build] Error 1
make: *** [Makefile:33:gocrack] error 2

It seems that the go build failure occurs in the docker and the GOPATH and GOROOT are set in the Dockerfile.build.ubuntu

ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH

Is there any problem in the Dockerfile.build.ubuntu?

Thank you!

Problem about ssl certificate configuriation

Hi, everyone, can someone solve the problem. When I use the command, there is

"{"time":"2017-11-15T00:47:12-08:00","level":"fatal","error":"failed to build cert pool with ca certificate","message":"Failed to start server"}"

problem building docker image

Hi guys,

Hope you are all well !

When I go to docker dir, and try to build

cd docker
make build

I have the following error:

$ make build
fatal: destination path 'hashcat' already exists and is not an empty directory.
HEAD is now at 72319875 Update version to 5.1.0
docker build --build-arg USER_ID="1000" --build-arg AUTHOR="Christopher Schmitt <[email protected]>" -t gocrack/hashcat_shared -f Dockerfile.hashcat.ubuntu /home/ubuntu/gocrack/docker
Sending build context to Docker daemon  76.81MB
Step 1/13 : FROM ubuntu:xenial
 ---> 96da9143fb18
Step 2/13 : ARG AUTHOR
 ---> Using cache
 ---> 7479248e0ca6
Step 3/13 : LABEL AUTHOR=${AUTHOR}
 ---> Using cache
 ---> f8e37fbfbce8
Step 4/13 : RUN apt-get update && apt-get install -y --no-install-recommends         make         build-essential         git         patch &&     rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> fa50948a6a19
Step 5/13 : ARG USER_ID
 ---> Using cache
 ---> b2034b290192
Step 6/13 : RUN useradd --non-unique --uid $USER_ID build
 ---> Using cache
 ---> 23e24603212f
Step 7/13 : WORKDIR /src/hashcat
 ---> Using cache
 ---> 4bda10f82317
Step 8/13 : COPY files/hashcat_shared.patch .
 ---> Using cache
 ---> 23c1f6622550
Step 9/13 : COPY external/hashcat .
 ---> Using cache
 ---> dd07e5c03c80
Step 10/13 : RUN chown -R build:build /src/hashcat
 ---> Using cache
 ---> 5ddb76737898
Step 11/13 : USER build
 ---> Using cache
 ---> 28fe75b40b55
Step 12/13 : RUN ["patch", "src/Makefile", "hashcat_shared.patch"]
 ---> Using cache
 ---> bd1e06a75b8d
Step 13/13 : CMD ["make", "DESTDIR=/out", "PREFIX=", "install"]
 ---> Using cache
 ---> 7318f41819dc
Successfully built 7318f41819dc
Successfully tagged gocrack/hashcat_shared:latest
docker run --rm --net=host -e USER_ID=1000 \
		-v /home/ubuntu/gocrack/docker/dist/hashcat:/out \
		gocrack/hashcat_shared
install -m 755 -d                                                    /out/share
gcc -c -O2 -pipe -std=gnu99 -Iinclude/ -IOpenCL/ -Ideps/LZMA-SDK/C -Ideps/OpenCL-Headers -DWITH_BRAIN -Ideps/xxHash -I/ -DWITH_HWMON src/affinity.c -o obj/affinity.NATIVE.SHARED.o -fpic
gcc -c -O2 -pipe -std=gnu99 -Iinclude/ -IOpenCL/ -Ideps/LZMA-SDK/C -Ideps/OpenCL-Headers -DWITH_BRAIN -Ideps/xxHash -I/ -DWITH_HWMON src/autotune.c -o obj/autotune.NATIVE.SHARED.o -fpic
gcc -c -O2 -pipe -std=gnu99 -Iinclude/ -IOpenCL/ -Ideps/LZMA-SDK/C -Ideps/OpenCL-Headers -DWITH_BRAIN -Ideps/xxHash -I/ -DWITH_HWMON src/benchmark.c -o obj/benchmark.NATIVE.SHARED.o -fpic
gcc -c -O2 -pipe -std=gnu99 -Iinclude/ -IOpenCL/ -Ideps/LZMA-SDK/C -Ideps/OpenCL-Headers -DWITH_BRAIN -Ideps/xxHash -I/ -DWITH_HWMON src/bitmap.c -o obj/bitmap.NATIVE.SHARED.o -fpic
src/Makefile:426: recipe for target 'install_make_shared_root' failed
install: cannot change permissions of '/out/share': No such file or directory
make: *** [install_make_shared_root] Error 1
make: *** Waiting for unfinished jobs....
Makefile:19: recipe for target 'hashcat' failed
make: *** [hashcat] Error 2

Any reason why that happened ?

Cheers,
X.

Docker Build Process is Difficult/Doesn't Work Properly

I got a few error when trying to build the docker images.

First, if I simply run make build I got the following:
docker run --rm --net=host -e USER_ID=1000
-v /home/oper/code/golang/src/github.com/fireeye/gocrack/docker/dist/hashcat:/out
gocrack/hashcat_shared
install -m 755 -d /out/share/doc/hashcat
install -m 755 -d /out/share/hashcat
gcc -c -pipe -std=gnu99 -Iinclude/ -Iinclude/lzma_sdk/ -IOpenCL/ -O2 -Ideps/OpenCL-Headers/ -DWITH_HWMON src/affinity.c -o obj/affinity.NATIVE.SHARED.o -fpic
gcc -c -pipe -std=gnu99 -Iinclude/ -Iinclude/lzma_sdk/ -IOpenCL/ -O2 -Ideps/OpenCL-Headers/ -DWITH_HWMON src/autotune.c -o obj/autotune.NATIVE.SHARED.o -fpic
gcc -c -pipe -std=gnu99 -Iinclude/ -Iinclude/lzma_sdk/ -IOpenCL/ -O2 -Ideps/OpenCL-Headers/ -DWITH_HWMON src/benchmark.c -o obj/benchmark.NATIVE.SHARED.o -fpic
gcc -c -pipe -std=gnu99 -Iinclude/ -Iinclude/lzma_sdk/ -IOpenCL/ -O2 -Ideps/OpenCL-Headers/ -DWITH_HWMON src/bitmap.c -o obj/bitmap.NATIVE.SHARED.o -fpic
install: cannot create directory '/out/share': Permission denied
install: cannot create directory '/out/share': Permission denied
src/Makefile:328: recipe for target 'install_docs' failed
make: *** [install_docs] Error 1
make: *** Waiting for unfinished jobs....
make: *** [install_shared] Error 1
src/Makefile:358: recipe for target 'install_shared' failed
Makefile:19: recipe for target 'hashcat' failed
make: *** [hashcat] Error 2

So there is a problem in the run of the hashcat docker container.

I then tried to run the same thing using sudo. This time, the hashcat part of the make build works, but in the gocrack one, I get the following error:
docker run --rm --net=host -e USER_ID=0
-v /home/oper/code/golang/src/github.com/fireeye/gocrack/docker/dist/gocrack:/out
-v /src/github.com/fireeye/gocrack:/go/src/github.com/fireeye/gocrack
gocrack/build
make: *** No targets specified and no makefile found. Stop.
Makefile:31: recipe for target 'gocrack' failed
make: *** [gocrack] Error 2

I then tried to make the different target seperately:
sudo make hashcat
make gocrack

I get a permission denied error after the make gocrack:
mkdir: cannot create directory ‘/home/oper/code/golang/src/github.com/fireeye/gocrack/docker/dist/gocrack’: Permission denied
Makefile:31: recipe for target 'gocrack' failed
make: *** [gocrack] Error 1

So I change the permissions of the dist directory and tried again make gocrack.
The docker build command works but the docker run fails:
docker run --rm --net=host -e USER_ID=1000
-v /home/oper/code/golang/src/github.com/fireeye/gocrack/docker/dist/gocrack:/out
-v /home/oper/code/golang/src/github.com/fireeye/gocrack:/go/src/github.com/fireeye/gocrack
gocrack/build
mkdir -p builds/
go build -tags """" -o /out/gocrack_worker -ldflags
"-X github.com/fireeye/gocrack/worker.CompileRev=dc14ad5
-X github.com/fireeye/gocrack/worker.CompileTime=1523610442
-X github.com/fireeye/gocrack/worker/engines/hashcat.HashcatVersion=v3.6.0"
cmd/gocrack_worker/.go
go: disabling cache (/home/build/.cache/go-build) due to initialization failure: mkdir /home/build: permission denied
go build -tags """" -o /out/gocrack_server -ldflags
"-X github.com/fireeye/gocrack/server.CompileRev=dc14ad5
-X github.com/fireeye/gocrack/server.CompileTime=1523610442"
cmd/gocrack_server/
.go
go: disabling cache (/home/build/.cache/go-build) due to initialization failure: mkdir /home/build: permission denied

I modified the file Dockerfile.build.ubuntu in order to add --create-home to RUN useradd --non-unique --uid $USER_ID build and now make gocrack works properly.

double free or corruption

I have gocat running with Hashcat 5.1 with a few tweaks other have done and everything run alright until any of the destroy functions are called. At this point I get either "double free or corruption" or a "free(): corrupted unsorted chunks:" error. Anyone seen this before or have any idea what this could be? Everything works, including password cracking up to this point.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.