quasar / Quasar

Remote Administration Tool for Windows
MIT License
8.81k stars 2.49k forks source link

Remote Desktop performance improvements #572

Open ValonK opened 7 years ago

ValonK commented 7 years ago

Hej, i'm currently working a lot with ffmpeg at Work writing basically a Desktop Stream Software something like Teamviewer without control. It's really amazing what you can do with ffmpeg (30-60fps x1080p). So I was thinking and want to know from @MaxXor would this be something you might want? :)

chico-depressive commented 7 years ago

@ValonK possible to get 4bit and 1bit streams with ffmpeg?

ValonK commented 7 years ago

Yeah its possible ! ffmpeg is very powerful its been developed by so many people. https://ffmpeg.org/

ghost commented 7 years ago

@ValonK Out of curiosity, would this be applicable to webcam streaming as well? I'm not sure why the current implementation of that seems so slow/bandwidth intensive when programs like skype seem to be able to handle it fine (and even meterpreter's method seems to give higher fps video with better quality)

Either way, improving the desktop streaming would be a really nice improvement! Especially if you could set some parameters on it.

abdullah2993 commented 7 years ago

Among other things the current implementation of remote desktop is passed on PULL model instead of traditional PUSH based model which actually results in low performance because the server requests the next frame. See https://github.com/quasar/QuasarRAT/issues/502

ValonK commented 7 years ago

@Cowboy-Curtis with FFmpeg you can stream everything that is streamable ;) I will start with a prototype and show some of the capabilities of FFmpeg. The only problem is that the ffmpeg.exe needs to be on the victims Pc. So basically if the stream gets started we first need to upload ffmpeg.exe ~40.mb, but believe me its worth it!!! As an example I streamed a whole movie from my work PC to my Home PC without an issue!!

ValonK commented 7 years ago

Question for you guys who are interested before I Start to implement. Do you guys prefer to receive the stream inside Quasar or start just Vlc only player window? Vlc does work much better than the .NET Control.

DragonzMaster commented 7 years ago

We can keep the current implementation and add the FFmpeg method along side with it but we need to try to find a lite version of FFmpeg to decrease the size

ValonK commented 7 years ago

I will see if I can find some lite version.

chico-depressive commented 7 years ago

@ValonK can you give us a proof of concept? I am very interested in this idea, I need faster remote desktop sessions

ValonK commented 7 years ago

Hej,

I'm working on it. it takes time and it is a lot of work. I did find a video with Linux but it's the same with windows. When I have a working build I will post it here. https://www.youtube.com/watch?v=SDU0vb5KVqo if anybody wants to help me would be appreciated (i hate windows forms :) ) I'm a wpf/MVVM guy.

ValonK commented 7 years ago

Work is in progress guys http://imgur.com/a/5sPzl :)

itapi commented 7 years ago

@ValonK i would be very happy to see this! I also started working on a small codec....involving few techniques...stuck somewhere...haha

chico-depressive commented 7 years ago

@ValonK thank you sir! can you provide us with 4bit and 1bit lossless/lossy compression?

chico-depressive commented 7 years ago

@ValonK sir, I can help you with something? Got some free time and want to learn

chico-depressive commented 7 years ago

@ValonK any progress this days?

ValonK commented 7 years ago

@chico-depressive there isn't much left , we have a deadline currently at Work. I will try to complete it this Weekend.

chico-depressive commented 7 years ago

@ValonK sir, if you need any help please tell me

how did you get this knowledge? you read a lot of books?

ValonK commented 7 years ago

Thanks @chico-depressive Yeah I went to university and now I'm working as a dev :) You can help me with Testing because I'm not using Quasar and I don't have any Machines that i "control", so testing this is not possible for me when I complete the Feature you could Test and Report any bugs or improvements to me.

chico-depressive commented 7 years ago

@ValonK consider it tested :)

It will suport for 1bit/4bit compression lossless/lossy?

Do you know if we can speed it up by using the gpu to render the video stream?

itapi commented 7 years ago

@ValonK @chico-depressive the main boost will come from devleoping a smart scanning algorithm which can easily detect changed regions...fast and accurate..i'm working on somthing like that.. we can work on it together if you want guys...

ValonK commented 7 years ago

@chico-depressive it all depends on internet connection on both sides , the Connection is the most important thing!

@itapi Sure sound very interesting, we can when this feature is finished

ghost commented 7 years ago

Im glad to know youre still around and working on this, and I don't mean to sound like a beggar, but do you have any ETA on when this might be finished? It's something I'm really looking forward to!

chico-depressive commented 7 years ago

@Cowboy-Curtis @ValonK me too, any help you need to speed it up, just tell me

ValonK commented 7 years ago

Ok guys yeah, here's my discord so we can talk tomorrow and you can help me.. https://discord.gg/8Nt45 :)

chico-depressive commented 7 years ago

@ValonK great! but invite expired for this link

ValonK commented 7 years ago

Sorry I'm new in discord I will give you new one when I'm home or you give us yours

chico-depressive commented 7 years ago

@ValonK hi, do you have skype or some kind of contact? thinking about donating to speed up the project, do you accept bitcoin?

knackrack615 commented 7 years ago

@ValonK Are you still working on this? i have some free time and some knowledge regarding ffmpeg

Send us a discord link when you have some time :)

itapi commented 7 years ago

@knackrack615 @chico-depressive i'm working on self implemented codec ,using libjpgTurbo library,and many other improvments. your welcome help. my skype name is Itamar.Yehezkel2

chico-depressive commented 7 years ago

great guyz, let's make remote desktop as fast as possible, challenge accepted, lol

chico-depressive commented 7 years ago

@itapi I do not know if you know, but google released recently a new libjpg with better compresion rates just forgot the name

chico-depressive commented 7 years ago

we can all talk on IRC, maybe create a channel for quasar 💃💃💃💃💃💃💃💃 💯 🥇🥇🥇🥇🥇🥇🥇

chico-depressive commented 7 years ago

anyone using jabber?

maddnias commented 7 years ago

An IRC channel would be cool.

itapi commented 7 years ago

@chico-depressive this is the guetzli extremly slow.. not for use right now

chico-depressive commented 7 years ago

Note: Guetzli uses a large amount of memory. You should provide 300MB of memory per 1MPix of the input image.

Note: Guetzli uses a significant amount of CPU time. You should count on using about 1 minute of CPU per 1 MPix of input image.

O.O

chico-depressive commented 7 years ago

@itapi "libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX, SSE2, AVX2, NEON, AltiVec) to accelerate baseline JPEG compression and decompression on x86, x86-64, ARM, and PowerPC systems."

cool!

knackrack615 commented 7 years ago

Alright everyone, i've made a Discord server for Quasar where we can all talk

https://discord.gg/4vSJ372

(You don't need a discord account to join but it would be a good idea to make one)

ghost commented 7 years ago

Kinda curious what happened with this, it seemed like so many people were interested in it but checking up on things it looks like nothing solid has gotten done yet :( Quasar rat with @ValonK 's audio recording is pretty much perfect except for it's current remote desktop/webcam streaming. I've tried a lot of other software out there right now and they all have problems that make them nonviable. I know everyone is busy with their own lives though, and I will continue to look forward to whatever the people the people working on this come up with! I will help with whatever I can but lack coding knowledge/experience but always like learning.

yankejustin commented 7 years ago

@Cowboy-Curtis From observation it seems that this project is at an indefinite standstill until MaxXor is out of college and has time to devote or this becomes a commercial (paid) project. Unfortunate, but most big projects eventually run into this wall. 😢

ValonK commented 7 years ago

I have much work going on private but... this remote desktop stream is not dead. This should be experimental since it requires lot of bandwith on both sides. I will continue this.

The north never forgets. ;)

ghost commented 7 years ago

Glad to hear people out there still care! I actually spent some time learning about ffmpeg which was interesting and it's fairly easy to just dump it on a remote machine with a batch file that streams desktop/webcam back to you. Much better than what's currently in quasarrat since I don't care about bandwidth and an option people might want to learn who aren't tech savvy enough to help code something into this rat.

ValonK commented 7 years ago

Fffmpeg is powerful. This is how I'm trying to build this into Quasar:

  1. Check if User has Vlc or FFmpeg.
  2. If so Choose Options in Quasar GUI.
  3. The FFmpeg Command should look something like https://pastebin.com/jxkpaYFM
  4. Send Command to User and Start Hidden FFmpeg or VLC Process.
  5. Start Admin Window in Quasar or VLC to watch the Stream.

Potential Problems:

High Bandwith on both Sides High Ram or CPU on User Machine, potential detection