psexec

Issues with running a PsExec process from code

戏子无情 提交于 2019-12-19 09:02:42
问题 I am experiencing a weird issue when attempting to run a .NET command line tool remotely using PsExec. When running PsExec from command line, it runs and completes fine. When running it from a console application (creating a process, running PsExec.exe with the necessary arguments to it) -- it is running OK. When running it from our in house custom tool that is used to run different tasks, it either times out or does not complete successfully. Here is the code i am using: Process p = new

How to determine the session id on remote machine for usage with psexec -i using script/powershell/…?

試著忘記壹切 提交于 2019-12-18 12:35:31
问题 I am in need of a script or powershell command that will be able to determine the session id of a specific logged in user on remote machine, to be later used as parameter to the psexec -i execution of remote gui process on that session of that user on the remote machine. So far i managed to use psexec \\remoteMachine -u user -p pswrd query session to get list of sessions on the remote machine: SESSIONNAME USERNAME ID STATE TYPE DEVICE console 0 Conn wdcon rdp-tcp#919 user 1 Active rdpwd rdp

Psexec “run as (remote) admin”

試著忘記壹切 提交于 2019-12-18 12:18:12
问题 I wrote some c# code that uses PSexe. I want it to run a remote exe on a machine connected to my LAN. That exe creates a new local user. When I run that exe locally on the remote machine (after right click --> "run as Admin") - it works fine. I don;t know how to simulate the right click --> "run as Admin" from Psexec. I have tried the -l flag but it didn't work 回答1: Use psexec -s The s switch will cause it to run under system account which is the same as running an elevated admin prompt. just

PsExec gets stuck on licence prompt when running non-interactively

穿精又带淫゛_ 提交于 2019-12-17 18:11:28
问题 I have a Hudson build script which calls the SysInternals PsExec utility. Normally, when PsExec is run for the first time by a given user it pops up a dialog box asking the user to accept the licence. The build agent runs as a service and I can see that the build gets stuck at PsExec. Process Explorer shows that PsExec is running, so I strongly suspect it's displaying that same prompt, but because it's running non-interactively there is no way to accept the prompt. Is there any way to get

PsExec Throws Error Messages, but works without any problems

巧了我就是萌 提交于 2019-12-17 12:20:35
问题 So we are using PsExec a lot in our automations to install virtual machines, as we can't use ps remote sessions with our windows 2003 machines. Everything works great and there are no Problems, but PsExec keeps throwing errors, even every command is being carried out without correctly. For example: D:\tools\pstools\psexec.exe $guestIP -u $global:default_user -p $global:default_pwd -d -i C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command "Enable-PSRemoting -Force" Enables the

PSEXEC, access denied errors

六月ゝ 毕业季﹏ 提交于 2019-12-17 04:16:11
问题 While I'm using PSEXEC.exe getting 'Access denied' error for remote systems. Any idea about how to solve this? 回答1: Hi i am placing here a summary from many sources online for various solutions to "access is denied" : most information can be found here (including requirements needed) - sysinternal help as someone mentioned add this reg key, and then restart the computer : reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1

【知识整理】简单的系统提权

谁说胖子不能爱 提交于 2019-12-14 02:16:03
系统提权 文章目录 系统提权 Windows与Linux系统的权限划分 Window本地提权 使用Sysinternal suite中的Psexec 设置时间任务 使用sc创建一个系统服务 注入进程提权***(隐蔽痕迹) 使用kali上的集成工具 脏牛提权 脏牛提权步骤 VMware共享文件 虚拟机中的共享文件路径 Windows与Linux系统的权限划分 本地提权 系统账号之间权限隔离 操作系统的安全基础 用户空间 内核空间 系统账号 用户账号登录时候获取权限令牌 服务账号无需用户登录已在后台启动服务 Window本地提权 使用Sysinternal suite中的Psexec 将下载好的sysinternal suite解压,找到Psexec,放入路径 C:\WINDOWS\system32 在cmd的命令交互界面输入 psexec 输入命令 psexec -i -s cmd 即可打开 一个具有系统权限的交互界面 设置时间任务 输入命令 at 17:23/interactive cmd 即可在规定的时间打开 一个具有系统权限的交互界面[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-ZELg085E-1576240645371)(picture/image-20191208173421495.png)] 使用sc创建一个系统服务 sc create

Sysinternals psexec not running on the remote desktop

我与影子孤独终老i 提交于 2019-12-13 22:41:27
问题 I've got two Remote Desktops hosted by a Hyper-V. On Remote Desktop "A", I've got a .bat file, which I want to execute. On Remote Desktop "B", I've got a cmd open with psexec cmd ready to invoke .bat file on machine "A". "path-to\\psexec.exe" \\ip -u domain\username -p pswd -i cmd.exe /c "path-to\\myFile.bat %*" The script contained in .bat file on machine "A" operates on the UI and thus requires a real screen to be open, so I am connected to two RDs simultaneously. However, when I call

C# Screenshot winlogon as well as User Desktop

那年仲夏 提交于 2019-12-13 12:14:20
问题 I am working with screen sharing project.But i was got into trouble to capture secure desktop. I have already ask related question here and got Answer too Pls go through above link as suggested by dymanoid. I am using PsExec exe to capture secured desktop/winlogon desktop as below The /x and /s switches run the process under the SYSTEM account and on the Winlogon desktop. PsExec /i /h /x /d /s "path_\screencapture.exe" Now screencapture exe is running as SYSTEM account on winlogon desktop, i

Permissions for PSExec run from SQL job

半世苍凉 提交于 2019-12-13 08:24:10
问题 I have the following in a CMDExec type SQL Job step (details changed): D:\path\PSExec.exe \\servername -accepteula -u "domain\username" -p password D:\path\executable.exe This works fine. However, I have set up a proxy in SQL Server for the same user account - which the job is using, so you'd think I wouldn't need the -u and -p arguments. But if I don't supply them I get the error: Unhandled Exception: System.Data.SqlClient.SqlException: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.