Closed joker8989 closed 6 years ago
I am not sure, I just tried it out with a 20mb file and it worked fine..
I have the same problem, I performed the test with two types of files, the first a notepad file containing only plain text with a size of 5mb, the second binary file also of 5mb. The text file has been uploaded correctly, since the binary file hangs in ... "Total bytes sent : 5242880 ( 5,242,880)" The script simply hangs in that part, and I need to close and reopen both server and client. Note: The download function works correctly, since the upload function hangs when sending binary files, executables etc. I performed the test in an external server / external client environment. I did not test the local network, server runs Win7x64 and Client Win10x64.
About upload problem, I did several tests. And I saw that the problem has no relation to the file type, whether it is executable or text file. The problem seems to be with some packet loss at the time of shipment. The larger the file being sent, the greater the chance of 1-byte corruption, and somehow the client or server does not handle it. And it just hangs. I did the test with very small file of 100kb, text files and executable. Both files have been transferred. So I was increasing the size of the file, I was able to send at maximum 800kb without crashing. So I did a network stress test, opened a torrent application and donated my entire upload. After that, when trying to send files to the client, I managed to transfer only files from 100 to 200kb, more than that the server crashed. On a local network will work smoothly, because the bandwidth is usually 1GBps, versus 600kbps from an external network. So the tests performed on virtual machines do not count as much for diagnostic purposes of this problem.
I did these tests using the download and upload options, both caught when sending or receiving files during and without network stress.
Perhaps implementing another form of handling the server, and receiving by the client solves the problem.
I was researching, and it seems that this upload problem affects many people who are developing a project with the parameters and functions similar to yours. I have yet to find an efficient way to eliminate this file transfer problem between server and client. I wanted to suggest another option, which can be considered an implementation, even if temporary. Since I can not transfer files directly from the server to the client using the conventional method, I was thinking of using an http or ftp server to store everything I want the client to download. So I upload these files to my http server. And then I pass this command to the client to download, using the same idea of downloading the keylogger from the github repository. Would it be possible to add another menu to the server so that I could insert the direct link from that file? ex: https: //www.myserver.com/myfile.rar .exe ... etc ... It has a similar function already on the server, but it is that of opening the browser, however it is very noisy. It would be best to implement on top of that new "requests.get" paramenter that you are using in the developer version.
I previously added that feature, but I removed it, since it was basically just a powershell command that you could run using the remote cmd feature.
Yes I had already tested this possibility as well, but the server cmd does not run the powershell. By typing powershell in the server cmd it crashes as well. I tried to download it through the Invoke-WebRequest parameter of powershell, but the server crashes. I tried using the -File script.ps1 parameter of powershell, but the server hangs and returns nothing. Not to mention that we can not rely so much on powershell, several versions of windows 7 and some early windows 10 comes off by safely executing scripts by powershell. But thank you for being helpful.
Okay, I was able to solve the powershell problem, running it in a second instance and not first by the server. It's nothing practical but it will do. Windows 7 does not have many libraries that Windows 10 already has, such as Invoke-WebRequest and Wget. But I got it another way.
@ArlenRicard try running just the client without building it to .exe. Probably not related, but might be as seen with the keylogger.
So on this problem I'm doing the following: These tests, I perform in two environments. One on a local network, another on an external network. The local network test works without problems, even because of the time of error, the transfer speed is instantaneous. Already in external network delay, since the network here transfers to 60kb / s against 100mb / s of the local network. Since I can not upload more than 400kb of file without the system crash, I upload a .bat file normally of 5kb at the maximum containing only the powershell commands. So this powershell .bat, search everything I need on my HTTP server. It does not have to be with antivirus, because the virtual machines that I use are clean, have only the client of your project. But for now I'm using the http server to upload the client files.
This problem, I believe will take time to have a solution. Looking on the internet, I have seen that many have this file transfer problem. This problem is similar to that problem of the windows ftp feature, it seems that it uses a treatment for very limited packet receive transmission, so these problems happen. Unlike you install an apache on the computer, and use your machine as http server. I did this to test, and seamlessly transferred all files from 30 up to 80mb. So this problem really seems to be with the handling of those data packets at the time of transmission and reception.
I actually had theses same problems on Linux when I was incorporating some of theses features. The reason was, some of the byte data got lost while sending it since I was trying to send all the data as one. I fixed this by incorporating a recvall()
function which checks to make sure all the data has been received.
Well, in my case I have not been successful yet. It's been a long time since I used the --s function to send files. However I tried to send now a simple 2mb binary. But it always hangs at the end, displaying the file size and nothing else. I am using server and client updates.
@ArlenRicard could you try testing the screenshot module, since it should generate a decently large file.
Yes I tested it, the screenshot function worked perfectly, I had no problem with receiving files. Only with the sending, using the --s function.
Very strange, they both use the same code for sending the file, could you try sending the screenshot using the --s option?
I'm going to take a test now. I will try to send 2 types of files 3 times each. And I'll post the result here.
You were right, the problem was solved. About the image that I sent, I had done the test only once with a file, and so it gave problem I gave up. I took the test now to take my doubts, I tried to send the same file 3 times. I tried uploading a .bmp file 3 times: Success in 3 attempts. I tried uploading a .rar file 3 times: Success in 3 attempts.
@ArlenRicard Can I close this now?
Yes, so far it's working perfectly for me.
i have just tested this "python backdoor" its very nice but when i try to send a large file to the remote computer i see it stucks i type the output file ( i sent before a smaller file 1.4 Kb - and it worked - so the commands r work) and it prints :
"Total bytes sent : 18403245 ( 18,403,245)"
that's it it does not print "Done" like i looked in the script (in the remote pc the file was not transferred) why?