cobbr / Covenant

Covenant is a collaborative .NET C2 framework for red teamers.
https://cobbr.io/Covenant.html
GNU General Public License v3.0
4.09k stars 756 forks source link

[Bug] Compilation Errors #135

Closed sandwich-destroyer closed 4 years ago

sandwich-destroyer commented 4 years ago

Feature Request or Bug Bug

Describe the feature request or bug Unable to execute any commands on a grunt. Sample error output below:


[01/24/2020 15:01:46 UTC] Command aborted

(operator) > ShellCmd dir

CompilerException: CompilationErrors: 
warning CS8021: No value for RuntimeMetadataVersion found. No assembly containing System.Object was found nor was a value for RuntimeMetadataVersion specified through options.
(2,21): error CS0518: Predefined type 'System.Object' is not defined or imported
(4,34): error CS0518: Predefined type 'System.String' is not defined or imported
(4,19): error CS0518: Predefined type 'System.String' is not defined or imported
(8,20): error CS0518: Predefined type 'System.Object' is not defined or imported
(8,20): error CS0103: The name 'Shell' does not exist in the current context
(10,16): error CS0518: Predefined type 'System.Object' is not defined or imported
(10,16): error CS0246: The type or namespace name 'Exception' could not be found (are you missing a using directive or an assembly reference?)
(10,61): error CS0518: Predefined type 'System.String' is not defined or imported
(10,80): error CS0518: Predefined type 'System.Object' is not defined or imported
(10,80): error CS0103: The name 'Environment' does not exist in the current context

[01/24/2020 15:07:45 UTC] Command aborted

(operator) > LogonPasswords

CompilerException: CompilationErrors: 
warning CS8021: No value for RuntimeMetadataVersion found. No assembly containing System.Object was found nor was a value for RuntimeMetadataVersion specified through options.
(2,21): error CS0518: Predefined type 'System.Object' is not defined or imported
(4,19): error CS0518: Predefined type 'System.String' is not defined or imported
(8,20): error CS0518: Predefined type 'System.Object' is not defined or imported
(8,20): error CS0103: The name 'Mimikatz' does not exist in the current context
(10,16): error CS0518: Predefined type 'System.Object' is not defined or imported
(10,16): error CS0246: The type or namespace name 'Exception' could not be found (are you missing a using directive or an assembly reference?)
(10,61): error CS0518: Predefined type 'System.String' is not defined or imported
(10,80): error CS0518: Predefined type 'System.Object' is not defined or imported
(10,80): error CS0103: The name 'Environment' does not exist in the current context

To Reproduce Steps to reproduce the behavior:

  1. Go to Grunts
  2. Click on Interact
  3. Type command
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Covenant Server Information:

Browser Information:

Target Information (System that implant is running on):

Additional context Add any other context about the problem here.

cobbr commented 4 years ago

Hey @sandwich-destroyer, looks like something went wrong on Installation. Be sure to follow the installation instructions precisely! https://github.com/cobbr/Covenant/wiki/Installation-And-Startup

I've noticed a common issue with Docker users is not specifying the correct path during this instruction: docker run -it -p 7443:7443 -p 80:80 -p 443:443 --name covenant -v </absolute/path/to/Covenant/Covenant/Data>:/app/Data covenant

Be sure you are specifying the full, correct path to your own Data folder.

cobbr commented 4 years ago

Can you try again and confirm that you have followed the instructions precisely. And if the issue continues, can you share a log of the exact instructions you use?

sandwich-destroyer commented 4 years ago

I am looking into it, will provide logs soon. Restarting from scratch.

sandwich-destroyer commented 4 years ago

Thanks for your help, turns out Windows Defender likes to turn itself back on after you disable it (even with Tamper Protection off).. Certain files were being cleaned off the system </3 . I had to make a change in the registry. instructions on tenforums