Articles

Metasploit Framework Windows Tutorial
Remote Desktop Connection
Windows Processes That May Be Dangerous
How-To use NetCat a Tutorial
Common Linux Commands
Common Ports
Netcat Commands
HTTP Response Codes
War-Google Hack Terms
Wardriving
Avoiding Social Engineering and Phishing Attacks
Intrusion Detection on Linux
Linux Intrusion Detection
Penetration Testing Guide
Penetration Testing Tools
Social Engineering Fundamentals, Part I: Hacker Tactics
Social engineering (computer security)
The Psychology of Social Engineering

The Archives

General GSO
GovernmentSecurity.org News & Suggestions
In The News
Open Topic
General Security Information
Trash Can
Exploit & Vulnerability Mailing List Archives
Trial Member Forum
Product and Program Reviews GSO Tutorials
System Security
Windows Systems
Beginners Section
Linux & Unix Systems
File Downloads
Exploit Research & Discussion Trojan & Virus Errata
Networking Security / Firewall / IDS / VPN / Routers
System Hardening
E-Mail Security
Wifi Security
Trial Member Uploads
Upload discovered Trojans & Mal ware
GSO Programming Section
C , C++ , VC++
Visual Basic.NET
Perl /CGI
Java/Javascript
PHP/XML/ASP/HTML
Assembly + Other
The Cork Board
Network Security Consultant Directory
Network Security Jobs
The Archives
Encryption Information
General Network Security
Internet Anonymity
HTTP Protocol Security
Linux Security
MS IIS Information
Exploit Articles
Programming / Tool Design
GSO Software Projects
Public Downloads
Microsoft Security Questions and Papers

Full Version: Netserverdiskenum
Killaloop
hello my friends
well I got a problem using NetServerDiskEnum and other functions.
I got 3 computers at home but I ain't running a domain controller.
now the problem is that NetServerDiskEnum requires admin privs on the remote computer, but doesnt give me the option to call it with username and password.
CODE

  nStatus = NetServerDiskEnum(pszServerName,
                              dwLevel,
                              (LPBYTE *) &pBuf,
                              dwPrefMaxLen,
                              &dwEntriesRead,
                              &dwTotalEntries,
                              NULL);

I'm not going to add an admin user with the same username and password on all machines just to be able to use this type of functions.
Is there any way around this? I tried to add a connection with WNetAddConnection2 first
CODE

netres.dwType = RESOURCETYPE_DISK;
netres.lpLocalName = NULL;
netres.lpRemoteName = remote_addr;
netres.lpProvider = NULL;
WNetAddConnection2(&netres, password, username, FALSE);

this did not work though.
I didn't want to use WMI for this simple task, but it looks like it isnt that simple.
nolimit
hmm, wierd. You'd think it'd let you specify a token option or something.

I'd use koderz.net to see if you can find any uses of it, and maybe a work around.
Killaloop
well actually it worked the way I thought its going to work (no documentation that it does work this way).
the problem only was that pszServerName was not null-terminated smile.gif
shame on me.
nolimit
*gasp* shame!ÛÛÛ²ÜÜÞ²

crap
=P
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2005 Invision Power Services, Inc.