cfalta/PowerShellArmoury

Question

Closed this issue · 5 comments

Hello, is it working with any C#, .Net programs? Because i got nothing with krbrelayup.exe

Invoke-KrbRelayUp
Unable to find type [KrbRelayUp.Program].
At line:14 char:18

  • $PrivateMethod = [KrbRelayUp.Program].GetMethod('Main',$bindingFlags)
  •              ~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (KrbRelayUp.Program:TypeName) [], RuntimeException
    • FullyQualifiedErrorId : TypeNotFound

You cannot call a method on a null-valued expression.
At line:15 char:1

  • $PrivateMethod.Invoke($Null,@(,$passed))
  •   + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
      + FullyQualifiedErrorId : InvokeMethodOnNull
    
    

PS C:\Users\user> Invoke-KrbRelayUp -command help
Unable to find type [KrbRelayUp.Program].
At line:14 char:18

  • $PrivateMethod = [KrbRelayUp.Program].GetMethod('Main',$bindingFlags)
  •              ~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (KrbRelayUp.Program:TypeName) [], RuntimeException
    • FullyQualifiedErrorId : TypeNotFound

You cannot call a method on a null-valued expression.
At line:15 char:1

  • $PrivateMethod.Invoke($Null,@(,$passed))
  •   + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
      + FullyQualifiedErrorId : InvokeMethodOnNull
      
      
      
      
      Also i was trying to execute rubeus and start some simple command. But i can see help menu in rebues if try to execute Invoke-rubeus -command help.
      
      
      
      Invoke-Rubeus hash /password:Password@123
    
     ______        _
    (_____ \      | |
     _____) )_   _| |__  _____ _   _  ___
    |  __  /| | | |  _ \| ___ | | | |/___)
    | |  \ \| |_| | |_) ) ____| |_| |___ |
    |_|   |_|____/|____/|_____)____/(___/
    
    v2.2.2
    
    
    

[*] Action: Calculate Password Hash(es)

[X] /password:X must be supplied!

You probably have to set the corresponding classes and functions (program/main) to public before you compile krbrelayup. Maybe have a look at the Rubeus source for reference.

Do u mean all private classes, bools, sets, consts to public in all available files .cs and modules?

No ^^ that would be a bit too much. Just the ones that you need to call for the entrypoint. I haven't looked at krbrelayup but I guess it would be a class called Program and a function called main. Make sure these are public and then try again.

Actually it's not working. I was changing few private classes in program but still getting same error. Did u do it or not?
KRBrelay

I just tried it with setting the "Program" class and the "Main" function within said class to public and that seems to do the trick. However, the shell always terminates after executing Invoke-KrbRelayUp, which is likely caused by some part of the original code that I am not aware of. You'd have to work around that yourself.