File Browser icon keeps circling and never finishes, and error in console
Empire Version
- Empire-sponsor 4.1.0
Starkiller Version starkiller-1.8.0.AppImage, and issue is also in starkiller-1.9.0-Sponsors.AppImage
OS Information (Linux flavor, Python version)
- OS: Kali Linux 2021.2
- Python: The version that's included in the Docker image.
Describe the bug
The "File Browser" never displays files, and I see an error in the console.
To Reproduce
Steps to reproduce the behavior:
-
Interact with an agent.
-
click on File Browser
-
Notice that circling dots never complete and never shows files.
-
See error in the console or Tasks: "[!] error running command: The term 'ConvertTo-Json' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again."
Expected behavior
I should see a list of files and directories.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
-
OS: Kali 2021.2 virtual machine (VirtualBox)
-
Version 2021.2
Additional context
Empire server is running in a Docker container built from Empire-Sponsors "sponsors-master" branch.
git clone https://github.com/BC-SECURITY/Empire-Sponsors.git && cd Empire-Sponsors
sudo docker build -t empire-sponsor:4.1.0 .
sudo docker create -v /empire --name data empire-sponsor:4.1.0
sudo docker run -it --privileged --net=host --volumes-from data empire-sponsor:4.1.0
I'm able to create a listener and stager, and after running the stager on the Windows target system, I get an agent check-in. I can interact with the agent and run commands. When I click on File Browser, the dots circling never stop and I see the "ConvertTo-Json" error I included above.
After chatting with Vinniebod in Discord, I found that the issue is caused by the fact that Powershell version 2 doesn't have the "ConvertTo-Json" function.
C:\>powershell -c $PSversiontable
Name Value
---- -----
CLRVersion 2.0.50727.8762
BuildVersion 6.1.7601.17514
PSVersion 2.0
WSManStackVersion 2.0
PSCompatibleVersions {1.0, 2.0}
SerializationVersion 1.1.0.1
PSRemotingProtocolVersion 2.1
C:\>powershell -version 2 -c "Get-date | select-object -Property * | ConvertTo-Json"
The term 'ConvertTo-Json' is not recognized as the name of a cmdlet, function,
script file, or operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again.
I don't know if you want to close this issue, or keep it open and include some type of error handling, or maybe disable the File Browser if it detects version 2?