4

I'm trying to read a file on a remote computer however, ports for file sharing are blocked. Actually most porst are closed and only have access to execute WMI and Registry queries.

Is it possible to read or pull data from a remote server using WMI or the registry?

El Chatu
  • 41
  • 1
  • 2
  • BTW I'm not trying to hack a system. We are building a infrastructure discovery tool. I do have admin access to the target machine(s) but communication is limited to WMI and Win Registry – El Chatu Oct 06 '11 at 23:24

2 Answers2

1

The WMI doesn't allow read the content of any local or remote fil. Instead provides a set classes to list, copy, rename, compress and get info about files and directories. These classes are CIM_DataFile, CIM_Directory and Win32_Directory. If you want to see a sample of how use these classes check this article Manipulating local/remote files and folders using Delphi and WMI which I wrote some time ago.

RRUZ
  • 134,889
  • 20
  • 356
  • 483
0

There's another possibility, created by Frank White a few months ago using this "cmd /c echo ..." approach:

strCommand = "cmd /c echo myTextCommands > c:\temp\testscript.txt"

To see a fully-fleshed out VBScript, see my solution here

Community
  • 1
  • 1
Lizz
  • 1,442
  • 5
  • 25
  • 51