Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempting to run the agent on linux using mono results in zero output. #51

Open
Console opened this issue Nov 24, 2016 · 19 comments
Open

Comments

@Console
Copy link

Console commented Nov 24, 2016

I'm having an odd issue here, attempting to run the hashtopus agent using mono with the correct runtime environment installed. Application leaves no output just simply closes when run in the terminal.

Any ideas?

Command output when run with -v for verbose:

user@box:~/hashtopus-agent$ mono -v hashtopus.exe
converting method System.OutOfMemoryException:.ctor (string)
Method System.OutOfMemoryException:.ctor (string) emitted at 0x41b709e0 to 0x41b70a11 (code length 49) [hashtopus.exe]
converting method (wrapper runtime-invoke) <Module>:runtime_invoke_void__this___object (object,intptr,intptr,intptr)
Method (wrapper runtime-invoke) <Module>:runtime_invoke_void__this___object (object,intptr,intptr,intptr) emitted at 0x41b70a30 to 0x41b70b18 (code length 232) [hashtopus.exe]
converting method System.SystemException:.ctor (string)
Method System.SystemException:.ctor (string) emitted at 0x41b70b20 to 0x41b70b51 (code length 49) [hashtopus.exe]
converting method System.Exception:.ctor (string)
Method System.Exception:.ctor (string) emitted at 0x41b70b60 to 0x41b70bc8 (code length 104) [hashtopus.exe]
converting method System.NullReferenceException:.ctor (string)
Method System.NullReferenceException:.ctor (string) emitted at 0x41b70bd0 to 0x41b70c01 (code length 49) [hashtopus.exe]
converting method System.StackOverflowException:.ctor (string)
Method System.StackOverflowException:.ctor (string) emitted at 0x41b70c10 to 0x41b70c31 (code length 33) [hashtopus.exe]
converting method hashtopus.Hashtopus:Main (string[])
converting method hashtopus.HtpService:.cctor ()
Method hashtopus.HtpService:.cctor () emitted at 0x41b70c40 to 0x41b70ca5 (code length 101) [hashtopus.exe]
converting method (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr)
Method (wrapper runtime-invoke) object:runtime_invoke_void (object,intptr,intptr,intptr) emitted at 0x41b70cc0 to 0x41b70d80 (code length 192) [hashtopus.exe]
converting method (wrapper managed-to-native) object:__icall_wrapper_mono_object_new_specific (intptr)
Restoring : local R18 <-
Method (wrapper managed-to-native) object:__icall_wrapper_mono_object_new_specific (intptr) emitted at 0x41b70d80 to 0x41b70df8 (code length 120) [hashtopus.exe]
converting method (wrapper remoting-invoke-with-check) System.ComponentModel.BackgroundWorker:.ctor ()
Method (wrapper remoting-invoke-with-check) System.ComponentModel.BackgroundWorker:.ctor () emitted at 0x41b70e00 to 0x41b70e39 (code length 57) [hashtopus.exe]
converting method System.ComponentModel.BackgroundWorker:.ctor ()
Method System.ComponentModel.BackgroundWorker:.ctor () emitted at 0x41b70e50 to 0x41b70e69 (code length 25) [hashtopus.exe]
converting method System.ComponentModel.Component:.ctor ()
Method System.ComponentModel.Component:.ctor () emitted at 0x41b70e80 to 0x41b70ea5 (code length 37) [hashtopus.exe]
converting method System.ComponentModel.Component:.cctor ()
Method System.ComponentModel.Component:.cctor () emitted at 0x41b70eb0 to 0x41b70ed0 (code length 32) [hashtopus.exe]
converting method (wrapper alloc) object:AllocSmall (intptr)
Method (wrapper alloc) object:AllocSmall (intptr) emitted at 0x41b70ef0 to 0x41b70f8a (code length 154) [hashtopus.exe]
converting method System.MarshalByRefObject:.ctor ()
Method System.MarshalByRefObject:.ctor () emitted at 0x41b70f90 to 0x41b70f99 (code length 9) [hashtopus.exe]
converting method (wrapper remoting-invoke-with-check) System.Threading.AutoResetEvent:.ctor (bool)
Method (wrapper remoting-invoke-with-check) System.Threading.AutoResetEvent:.ctor (bool) emitted at 0x41b70fa0 to 0x41b70fea (code length 74) [hashtopus.exe]
converting method System.Threading.AutoResetEvent:.ctor (bool)
Method System.Threading.AutoResetEvent:.ctor (bool) emitted at 0x41b71000 to 0x41b71025 (code length 37) [hashtopus.exe]
converting method System.Threading.EventWaitHandle:.ctor (bool,System.Threading.EventResetMode)
Method System.Threading.EventWaitHandle:.ctor (bool,System.Threading.EventResetMode) emitted at 0x41b71030 to 0x41b7108d (code length 93) [hashtopus.exe]
converting method System.Threading.WaitHandle:.ctor ()
Method System.Threading.WaitHandle:.ctor () emitted at 0x41b710b0 to 0x41b710c9 (code length 25) [hashtopus.exe]
converting method System.Threading.WaitHandle:.cctor ()
Method System.Threading.WaitHandle:.cctor () emitted at 0x41b710d0 to 0x41b710ee (code length 30) [hashtopus.exe]
converting method System.Threading.EventWaitHandle:IsManualReset (System.Threading.EventResetMode)
Method System.Threading.EventWaitHandle:IsManualReset (System.Threading.EventResetMode) emitted at 0x41b71100 to 0x41b71148 (code length 72) [hashtopus.exe]
converting method (wrapper managed-to-native) System.Threading.NativeEventCalls:CreateEvent_internal (bool,bool,string,bool&)
Restoring : local R21 <-
Method (wrapper managed-to-native) System.Threading.NativeEventCalls:CreateEvent_internal (bool,bool,string,bool&) emitted at 0x41b71150 to 0x41b711e9 (code length 153) [hashtopus.exe]
converting method System.Threading.WaitHandle:set_Handle (intptr)
Method System.Threading.WaitHandle:set_Handle (intptr) emitted at 0x41b711f0 to 0x41b71318 (code length 296) [hashtopus.exe]
converting method Microsoft.Win32.SafeHandles.SafeWaitHandle:.ctor (intptr,bool)
Method Microsoft.Win32.SafeHandles.SafeWaitHandle:.ctor (intptr,bool) emitted at 0x41b71330 to 0x41b71366 (code length 54) [hashtopus.exe]
converting method Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid:.ctor (bool)
Method Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid:.ctor (bool) emitted at 0x41b71370 to 0x41b71395 (code length 37) [hashtopus.exe]
converting method System.Runtime.InteropServices.SafeHandle:.ctor (intptr,bool)
Method System.Runtime.InteropServices.SafeHandle:.ctor (intptr,bool) emitted at 0x41b713a0 to 0x41b713d8 (code length 56) [hashtopus.exe]
Method hashtopus.Hashtopus:Main (string[]) emitted at 0x41b713e0 to 0x41b7141d (code length 61) [hashtopus.exe]
converting method (wrapper runtime-invoke) <Module>:runtime_invoke_void_object (object,intptr,intptr,intptr)
Method (wrapper runtime-invoke) <Module>:runtime_invoke_void_object (object,intptr,intptr,intptr) emitted at 0x41b71440 to 0x41b71518 (code length 216) [hashtopus.exe]
converting method (wrapper remoting-invoke-with-check) hashtopus.Hashtopus/Service:.ctor ()
Method (wrapper remoting-invoke-with-check) hashtopus.Hashtopus/Service:.ctor () emitted at 0x41b71520 to 0x41b71559 (code length 57) [hashtopus.exe]
converting method hashtopus.Hashtopus/Service:.ctor ()
Method hashtopus.Hashtopus/Service:.ctor () emitted at 0x41b71570 to 0x41b715a1 (code length 49) [hashtopus.exe]
converting method System.ServiceProcess.ServiceBase:.ctor ()
Method System.ServiceProcess.ServiceBase:.ctor () emitted at 0x41b715c0 to 0x41b715e9 (code length 41) [hashtopus.exe]
converting method System.ServiceProcess.ServiceBase:set_ServiceName (string)
Method System.ServiceProcess.ServiceBase:set_ServiceName (string) emitted at 0x41b71600 to 0x41b71690 (code length 144) [hashtopus.exe]
converting method System.ServiceProcess.ServiceBase:Run (System.ServiceProcess.ServiceBase)
Method System.ServiceProcess.ServiceBase:Run (System.ServiceProcess.ServiceBase) emitted at 0x41b71690 to 0x41b716d1 (code length 65) [hashtopus.exe]
converting method (wrapper alloc) object:AllocVector (intptr,intptr)
Method (wrapper alloc) object:AllocVector (intptr,intptr) emitted at 0x41b716f0 to 0x41b717ec (code length 252) [hashtopus.exe]
converting method (wrapper stelemref) object:virt_stelemref_complex (intptr,object)
Method (wrapper stelemref) object:virt_stelemref_complex (intptr,object) emitted at 0x41b71800 to 0x41b718c0 (code length 192) [hashtopus.exe]
converting method (wrapper managed-to-native) object:__icall_wrapper_mono_object_isinst (object,intptr)
Restoring : local R19 <-
Method (wrapper managed-to-native) object:__icall_wrapper_mono_object_isinst (object,intptr) emitted at 0x41b718c0 to 0x41b71943 (code length 131) [hashtopus.exe]
converting method System.ServiceProcess.ServiceBase:Run (System.ServiceProcess.ServiceBase[])
Method System.ServiceProcess.ServiceBase:Run (System.ServiceProcess.ServiceBase[]) emitted at 0x41b71950 to 0x41b71986 (code length 54) [hashtopus.exe]
converting method (wrapper runtime-invoke) object:runtime_invoke_virtual_void__this__ (object,intptr,intptr,intptr)
Method (wrapper runtime-invoke) object:runtime_invoke_virtual_void__this__ (object,intptr,intptr,intptr) emitted at 0x41b71990 to 0x41b71a60 (code length 208) [hashtopus.exe]
converting method System.ComponentModel.Component:Finalize ()
Method System.ComponentModel.Component:Finalize () emitted at 0x41b71a60 to 0x41b71aa0 (code length 64) [hashtopus.exe]
converting method System.ServiceProcess.ServiceBase:Dispose (bool)
Method System.ServiceProcess.ServiceBase:Dispose (bool) emitted at 0x41b71aa0 to 0x41b71aa9 (code length 9) [hashtopus.exe]
converting method System.ComponentModel.Component:Dispose (bool)
converting method System.EventArgs:.cctor ()
Method System.EventArgs:.cctor () emitted at 0x41b71ab0 to 0x41b71ae2 (code length 50) [hashtopus.exe]
converting method (wrapper managed-to-native) object:__icall_wrapper_mono_gc_alloc_obj (intptr,intptr)
Restoring : local R19 <-
Method (wrapper managed-to-native) object:__icall_wrapper_mono_gc_alloc_obj (intptr,intptr) emitted at 0x41b71af0 to 0x41b71b73 (code length 131) [hashtopus.exe]
converting method System.EventArgs:.ctor ()
Method System.EventArgs:.ctor () emitted at 0x41b71b80 to 0x41b71b89 (code length 9) [hashtopus.exe]
Method System.ComponentModel.Component:Dispose (bool) emitted at 0x41b71b90 to 0x41b71c80 (code length 240) [hashtopus.exe]
converting method System.Runtime.InteropServices.SafeHandle:Finalize ()
Method System.Runtime.InteropServices.SafeHandle:Finalize () emitted at 0x41b71ca0 to 0x41b71d13 (code length 115) [hashtopus.exe]
converting method Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid:get_IsInvalid ()
Method Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid:get_IsInvalid () emitted at 0x41b71d20 to 0x41b71d81 (code length 97) [hashtopus.exe]
converting method Microsoft.Win32.SafeHandles.SafeWaitHandle:ReleaseHandle ()
Method Microsoft.Win32.SafeHandles.SafeWaitHandle:ReleaseHandle () emitted at 0x41b71d90 to 0x41b71db2 (code length 34) [hashtopus.exe]
converting method (wrapper managed-to-native) System.Threading.NativeEventCalls:CloseEvent_internal (intptr)
Restoring : local R17 <-
Method (wrapper managed-to-native) System.Threading.NativeEventCalls:CloseEvent_internal (intptr) emitted at 0x41b71dc0 to 0x41b71e38 (code length 120) [hashtopus.exe]
converting method System.Runtime.ConstrainedExecution.CriticalFinalizerObject:Finalize ()
Method System.Runtime.ConstrainedExecution.CriticalFinalizerObject:Finalize () emitted at 0x41b71e40 to 0x41b71e6e (code length 46) [hashtopus.exe]
converting method System.Threading.Thread:Finalize ()
Method System.Threading.Thread:Finalize () emitted at 0x41b71e70 to 0x41b71e9f (code length 47) [hashtopus.exe]
converting method System.Runtime.Remoting.Contexts.Context:Finalize ()
Method System.Runtime.Remoting.Contexts.Context:Finalize () emitted at 0x41b71ea0 to 0x41b71ece (code length 46) [hashtopus.exe]
converting method System.Threading.InternalThread:Finalize ()
Method System.Threading.InternalThread:Finalize () emitted at 0x41b71ed0 to 0x41b71f0f (code length 63) [hashtopus.exe]
converting method (wrapper managed-to-native) System.Threading.InternalThread:Thread_free_internal (System.Threading.InternalThread,intptr)
Restoring : local R18 <-
Method (wrapper managed-to-native) System.Threading.InternalThread:Thread_free_internal (System.Threading.InternalThread,intptr) emitted at 0x41b71f20 to 0x41b71fc4 (code length 164) [hashtopus.exe]
@soxrok2212
Copy link

soxrok2212 commented Nov 26, 2016

Can confirm the same issue on Debian 8 with Mono 3.2.8 (also tested with 2.0). Tested with v0.9.8 of hashtopus.exe and had no problems. Everything is updated, .NET 2.0 environment is installed correctly. Here is a sample:
root@debian-vm:/home/soxrok2212/Desktop/hashtopus| ⇒ mono hashtopus.exe root@debian-vm:/home/soxrok2212/Desktop/hashtopus| ⇒

I get the same output when I run with verbosity enabled.

@curlyboi
Copy link
Owner

This is very strange. I suspect this has something to do with the new feature of running as Windows service.
I will look into that. How about exit code, maybe it returns the error as exit code. Can you post the one you get?

@curlyboi
Copy link
Owner

The exit code is not printed on the screen but is returned everytime an executable exits.

@Console
Copy link
Author

Console commented Dec 15, 2016

So it exits normally.

user@box:~/hashtopus$ mono hashtopus.exe
user@box:~/hashtopus$ echo $?
0

@samitherona
Copy link

IIRC, the problem is the "Environment.UserInteractive" check, which always returns false on Linux. Somewhere I read that you can circumvent it by checking if you are running Linux and then calling Mono.Unix.Native.Syscall.isatty(0) to see if you have a terminal available. I didn't try it though.

@curlyboi
Copy link
Owner

curlyboi commented Jan 5, 2017

i have just published a fix, please try.

@curlyboi curlyboi closed this as completed Jan 5, 2017
@soxrok2212
Copy link

soxrok2212 commented Jan 5, 2017

This does produce output now, but after requesting the server URL it exits.

root@debian:/home/soxrok2212/hashtopus# mono hashtopus.exe
Hashtopus 1.5 running in console mode
root@debian:/home/soxrok2212/hashtopus#

Running with mono 3.2.8 on Debian 8. Still exits 0.

@curlyboi curlyboi reopened this Jan 11, 2017
@curlyboi
Copy link
Owner

Try to run this with the debug option. Please note that the command line options were now replaced with XML configuration file so you need to add a "debug" option to the xml.

@soxrok2212
Copy link

soxrok2212 commented Jan 12, 2017

root@debian:/home/soxrok2212/hashtopus# mono hashtopus.exe
Hashtopus 1.5 running in console mode
Debug mode on.
Reading XML element url
root@debian:/home/soxrok2212/hashtopus#

Same configuration on Windows works perfectly fine.

@curlyboi
Copy link
Owner

maybe you have bad line endings in the xml? not sure if that would affect anything but still...

@soxrok2212
Copy link

Double checked everything, that doesn't appear to be the problem.

@curlyboi
Copy link
Owner

i have pushed a new commit that outputs http requests in debug mode. please try that to see if it gets to that point.

@soxrok2212
Copy link

soxrok2212 commented Jan 13, 2017

root@debian:/home/soxrok2212/hashtopus-vanilla# mono hashtopus.exeHashtopus 1.5 running in console mode
Debug mode on.
Reading XML element url
HTTP dl-string: myserverblablabla
root@debian:/home/soxrok2212/hashtopus-vanilla#

Doesn't look like much. This may be a problem on my end so before you try anything else let me do a fresh Debian 8 install and see if the problem is remedied.

@curlyboi
Copy link
Owner

you could try to wireshark if the http transfer actually happens. also, you should compile the code for debug and not release, if you are not already doing that. the debug code prints out verbose error messages.

@JuggyMcNutty
Copy link

it would seem im having this problem as well but on a windows 10 machine...
no output after url/ip entered...

@curlyboi
Copy link
Owner

curlyboi commented Feb 8, 2017

did you try wiresharking the network traffic to verify if it comes through?

looks to me like you have a server problem instead

@JuggyMcNutty
Copy link

JuggyMcNutty commented Feb 10, 2017

yup i have wireshark running and not reporting anything to the server ip but when i setup hashtopus agent 0.9.8 and hashtopus server 0.10 and compile that agent binary everything works so i dont believe it is a server issue as older versions work i am getting the same results in mono on ubuntu

how do i enable debug exactly?

@curlyboi
Copy link
Owner

so this means the http request doesn't even get through? that would point out to some .NET (mono) related problem

@hcpus
Copy link

hcpus commented Apr 3, 2017

Hello guys,
do you have any solutions for the problem u talked about? i am also trying to run the hashtopus-agent v1.5 with an hashcat version >=3.0 but get the same error message like Console in the top of this thread (with "mono -v hashtopus.exe"). There are no problems with older versions.. i also use mono v3.2.8 and with mono hashtopus.exe are 0 processes running.

can you give me any hints what i can do?

linux verson: root@dx2903:/home/user/hashtopus# cat /proc/version
Linux version 3.16.0-4-amd64 ([email protected]) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.39-1+deb8u2 (2017-03-07)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants