The GatherNetworkinfo.vbs Script

I recently read the whitepaper“Using Windows Script Host and COM to Hack Windows” that is mentioning the GatherNetworkinfo.vbs script I hadn’t paid attention to yet. The gathernetworkinfo.vbs script comes by default with every Windows 7 installation and is located within the C:\Windows\System32\ folder.

The script does collect various networking information about the Windows 7 system and its configuration and dumps the information into the C:\Windows\System32\Config folder.

On a system where the script hasn’t been executed yet the Config folder looks as following:

2011-06-20 21h42_17

Now open a command prompt with elevated rights and run cscript c:\windows\system32\gathernetworkinfo.vbs When the script has completed you will see that additional files have been added to the Config folder.

2011-06-20 21h47_28

The structure of the script is quite easy to understand. Within the first part of the script all functions are defined, the second part defines the output file names and the last part actually calls the individual data collection functions including the output file parameter.

The script is also defined within a scheduled task called Nettrace which is not scheduled to run automatically.

2011-06-20 21h57_23

9 Replies to “The GatherNetworkinfo.vbs Script”

  1. Hello Alex,
    I’m really glad that you published the informations I was looking for. Thank you.
    When I was investigating my system I found the script gathernetworkinfo.vbs. Though I’m not familiar with .vbs I could follow your explanations very good.
    However, what I find really strange is, that it’s obviously not a script common users run and that it’s not clear who the informations uses in case it’s executed.
    The scheduled task is implemented but never will be executed by default and there aren’t plenty informations about the script.

    Do you have an idea who the script uses or what it’s basically good for? Of course, the informations might be very helpful, so in general it’s good script.

    Thank you in advance,


  2. At first i thought it was a freaking malware, but upon opening it and inspecting its contents it looked quite harmless but gathering network info through a vbs seemed like i had been hacked, so i looked it up, turns out it was a safe microsoft file that comes with windows 7, how unprofessional of Microsoft!

  3. GatherNetworkinfo.vbs is defined by default in Task Scheduler.

    Go to Administrative Tools -> Task Scheduler and drill down the Task Scheduler Library -> Microsoft -> Windows -> NetTrace and there it is ready to execute and enabled for running.

  4. Absolutely great info, Alex, I am still I suspect only the peak of the iceberg in my case.

    I wish I had taken the advise of my father and studied IT more than four decades ago. I really would like to know what exactly happens on my system.

    But this was really helpful, I wondered about the origin of the javascript routines. And this makes sense.

  5. FWIW, the first thing a hacker does is gather information about the system. Since this has user rights, the hacker could run it to gather information. I would rename this to “everything a hacker wanted to know about this computer but was too inexperienced to ask.” “or hacker info here!” FWIW

  6. ‘SysInternals’ “AutoRuns” program found it still being referenced in my Windows 8.1…
    I just simply DELETED that damn script file !!!!! come-what-may……
    Along with anything/everything to do with any sort of Remote-Access too !!!!

  7. I am wondering if it works together with CompatTelRunner.exe.
    CompatTelRunner runs two tasks at the same time on my W7 PC every day. I’m trying to get rid of it as it seems like part of GWX / W10 force-feeding.
    See notes under “”
    Supposedly you can find CompatTelRunner in tasks but the closest thing I see is the Gather… vbs.
    Any ideas on that?
    Thanks, L

  8. Have read claims that the information is essential for wi-fi connection. Think I’ll leave it enabled for now.

    “The script does collect various networking information about the Windows 7 system and its configuration and dumps the information into the C:\\Windows\\System32\\Config folder. This is to connect to Wi-Fi!! Very important script.”

Leave a Reply