Skip to content

Instantly share code, notes, and snippets.

@dtmsecurity
Created December 1, 2020 18:01
Show Gist options
  • Save dtmsecurity/dc6597756013cd93ce6f8755d20b7ec2 to your computer and use it in GitHub Desktop.
Save dtmsecurity/dc6597756013cd93ce6f8755d20b7ec2 to your computer and use it in GitHub Desktop.

Revisions

  1. dtmsecurity created this gist Dec 1, 2020.
    34 changes: 34 additions & 0 deletions ISeeSharpProcess.cs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    using System;
    using System.Diagnostics;

    namespace ISeeSharpProcess
    {
    class Program
    {
    // Port of https://gist.github.com/mubix/1536156f06633a54e7f1f819d7fa740a
    static void GetCSharpProcess()
    {
    foreach(Process proc in Process.GetProcesses())
    {
    try
    {
    foreach (ProcessModule mod in proc.Modules)
    {
    if (mod.ModuleName.Contains("mscoree"))
    {
    Console.WriteLine("[*] .NET found in {0} at {1}", proc.ProcessName, proc.MainModule.FileName);
    }
    }
    }
    catch
    {
    }
    }
    }

    static void Main(string[] args)
    {
    GetCSharpProcess();
    }
    }
    }