Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: QueryPerformanceData #1677

Open
ghost-ng opened this issue Jan 6, 2024 · 1 comment
Open

Feature Request: QueryPerformanceData #1677

ghost-ng opened this issue Jan 6, 2024 · 1 comment

Comments

@ghost-ng
Copy link

ghost-ng commented Jan 6, 2024

This is a feature request to implement the nmap lua script functionality of https://svn.nmap.org/nmap/scripts/smb-enum-processes.nse

This will display the running processes etc from the registry performance data counters.

Right now, rrp only has a way to open the performance data registry. Please implement a way to query AND parse the results.

# Open Performance Data
        openhkpd_result = rrp.hOpenPerformanceData(self.dce, samDesired=rrp.MAXIMUM_ALLOWED | rrp.KEY_ENUMERATE_SUB_KEYS | rrp.KEY_QUERY_VALUE)
        #openhkpd_result.dump()
        ans = rrp.hBaseRegQueryValue(self.dce, openhkpd_result['phKey'], lpValueName="Counter 009")
        result['title-database'] = parse_perf_title_data(ans[1])
        counter_ID = result['title-database']['Process']  # 230
        queryvalue_result = rrp.hBaseRegQueryValue(self.dce, openhkpd_result['phKey'], lpValueName=str(counter_ID))

The above hangs, the below has a not found error:

queryvalue_result = rrp.hBaseRegQueryValue(self.dce, openhkpd_result['phKey'], lpValueName="Counter " + str(counter_ID))

There is a very high chance I am not doing this the right.

@ghost-ng
Copy link
Author

figured it out when the perf objects have multiple instances - so i can now get the remote processes, still having issues if instances are 0.

https://github.com/ghost-ng/slinger

src/slingerpkg/lib/winreg.py
|---- def show_process_list(self, args):
src/slingerpkg/lib/dcetransport.py
|---- def _hQueryPerformaceData(self, object_num, arch=64):
src/slingerpkg/lib/msrpcperformance.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant