mvrozanti / RAT-via-Telegram

Windows Remote Administration Tool via Telegram
MIT License
647 stars 344 forks source link

/get_chrome not working #21

Closed adastmins closed 5 years ago

adastmins commented 7 years ago
callback(item)

File "C:\1111\rat.py", line 600, in handle responses = split_string(4096, response) File "C:\1111\rat.py", line 184, in split_string for i in str(st): UnicodeEncodeError: 'ascii' codec can't encode characters in position 6628-6631: ordinal not in range(128)

mvrozanti commented 7 years ago

The problem in this case is that some non-unicode character is being appended to our responses_string. What's your target machine's default charset?

ghost commented 6 years ago

more troubles you will have when you compile with no console and pyinstaller to solve all these problems you need to use this wrapper for subprocess call:

`def subprocess_args(include_stdout=True):

if hasattr(subprocess, 'STARTUPINFO'):

    si = subprocess.STARTUPINFO()
    si.dwFlags |= subprocess.STARTF_USESHOWWINDOW

    env = os.environ
else:
    si = None
    env = None

if include_stdout:
    ret = {'stdout': subprocess.PIPE}
else:
    ret = {}

ret.update({'stdin': subprocess.PIPE,
            'stderr': subprocess.PIPE,
            'startupinfo': si,
            'env': env })
return ret

s = subprocess.check_output('tasklist', **subprocess_args(False)) output = s.decode('utf-8', 'ignore')`

mvrozanti commented 6 years ago

@kojibhy Have you tested this? Pull requests are more than welcome at this point

ghost commented 6 years ago

yes, I use it all time with pyinstaller --noconsole

Suburbanno commented 6 years ago

How to solve? I'm a beginner at this, I tried using an old script using the path of my computer. But it didn't work

google

X3eRo0 commented 6 years ago

This function don't work as of now and one issue has already opened on same topic

mvrozanti commented 6 years ago

@Suburbanno welcome.

We get more information from errors so if you can spew out as many as you can that would be great

X3eRo0 commented 6 years ago

Glad you're back @mvrozanti

Suburbanno commented 6 years ago

@mvrozanti welcome again, good, it is not persistent, when turning on the computer, the process be active but the bot does not work, I have to open the. exe again

Suburbanno commented 6 years ago

@mvrozanti end I'm loving tinkering with all this, please do not abandon the project, continue adding resources

mvrozanti commented 6 years ago

@Suburbanno have you got admin rights on target machine?

I added a trycatch block logging to <hide_folder>/.user

Suburbanno commented 6 years ago

@mvrozanti vai ser em pt mesmo, tenho permissões admin sim, já que vc atualizou, vou fazer tudo do zero e dou o feedback.

Suburbanno commented 6 years ago

@mvrozanti bom, como antes, só alguns comandos funcionam, os demais param o bot.

mvrozanti commented 6 years ago

Are you running Win10? Errors really do help. Please post your log file

Suburbanno commented 6 years ago

sim, estou usando o Windows 10 pro, como posso obter os logs?

mvrozanti commented 6 years ago

%appdata%/Portal probably. Win10 defender, I found out this morning, classifies this program as 'Feury.A!cl' trojan. Does this happen to you?

Might as well Ctrl+Shift+Esc to see if it is enabled in the Startup section. Should be listed as 'Portal'

Suburbanno commented 6 years ago

não consegui upar o arquivo aqui, segue no pastebin @mvrozanti
portal Bom, sobre o windows defender não posso te falar, ele é desativado aqui.

Suburbanno commented 6 years ago

@mvrozanti

mvrozanti commented 6 years ago

What we should be doing is append exception logs to a new file. But for the time's sake, try and run it in the shell wtih python2 and post the screenshot.

Suburbanno commented 6 years ago

@mvrozanti pastebin só tenho o python2 instalado. apaguei o arquivo de log antigo, rodei o script, executei os comandos que funcionavam e em seguida os que freezam o bot, gerando assim esse log.

mvrozanti commented 6 years ago

This is actually a separate issue than that of get_chrome so you should create a new one. I do not know why this is happening. I do know that you cannot run two instances of the same bot at the same time. Maybe this is related to the error?

Else I really don't know what to look for.

Suburbanno commented 6 years ago

@mvrozanti execute o comando /arp por exemplo, ele irá freezar o bot.

mvrozanti commented 5 years ago

Since /get_chrome works I'm closing this.