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

E_INVALIDARG - One or more arguments are invalid #81

Closed
helloyw opened this issue Aug 26, 2022 · 7 comments
Closed

E_INVALIDARG - One or more arguments are invalid #81

helloyw opened this issue Aug 26, 2022 · 7 comments

Comments

@helloyw
Copy link

helloyw commented Aug 26, 2022

An error occurred while requesting a certificate using a domain user
I am using version 4.0
This is the command I used:certipy req -username John@test.com -p Passowrd! -ca test-DC01-CA -template User -target 173.100.4.60 -debug
The following is the error report:
[+] Trying to connect to endpoint: ncacn_np:173.100.4.60[\pipe\cert] [proxychains] Strict chain ... 192.168.172.130:1080 ... 173.100.4.60:445 ... OK [+] Connected to endpoint: ncacn_np:173.100.4.60[\pipe\cert] [-] Got error: RequestSessionError: code: 0x80070057 - E_INVALIDARG - One or more arguments are invalid. Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/Certipy-4.0.0-py3.9.egg/certipy/entry.py", line 60, in main actions[options.action](options) File "/usr/local/lib/python3.9/dist-packages/Certipy-4.0.0-py3.9.egg/certipy/commands/parsers/req.py", line 12, in entry req.entry(options) File "/usr/local/lib/python3.9/dist-packages/Certipy-4.0.0-py3.9.egg/certipy/commands/req.py", line 764, in entry request.request() File "/usr/local/lib/python3.9/dist-packages/Certipy-4.0.0-py3.9.egg/certipy/commands/req.py", line 715, in request cert = self.interface.request(csr, attributes) File "/usr/local/lib/python3.9/dist-packages/Certipy-4.0.0-py3.9.egg/certipy/commands/req.py", line 208, in request response = self.dce.request(request) File "/usr/local/lib/python3.9/dist-packages/impacket-0.9.25.dev1+20220502.112312.90866d4c-py3.9.egg/impacket/dcerpc/v5/rpcrt.py", line 880, in request raise exception

@ElizabethHanson1999
Copy link

I have the same issue.
I execute this command :
certipy req -username test@example.com -p @dmin123 -ca adds.example.com -template User -debug
And i got this out put :
Certipy v4.0.0 - by Oliver Lyak (ly4k)

[+] Trying to resolve 'EXAMPLE.COM' at '192.168.17.139'
[+] Resolved 'EXAMPLE.COM' from cache: 192.168.17.139
[+] Generating RSA key
[*] Requesting certificate via RPC
[+] Trying to connect to endpoint: ncacn_np:192.168.17.139[\pipe\cert]
[+] Connected to endpoint: ncacn_np:192.168.17.139[\pipe\cert]
[-] Got error: RequestSessionError: code: 0x80070057 - E_INVALIDARG - One or more arguments are invalid.
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/Certipy-4.0.0-py3.10.egg/certipy/entry.py", line 60, in main
actionsoptions.action
File "/usr/local/lib/python3.10/dist-packages/Certipy-4.0.0-py3.10.egg/certipy/commands/parsers/req.py", line 12, in entry
req.entry(options)
File "/usr/local/lib/python3.10/dist-packages/Certipy-4.0.0-py3.10.egg/certipy/commands/req.py", line 764, in entry
request.request()
File "/usr/local/lib/python3.10/dist-packages/Certipy-4.0.0-py3.10.egg/certipy/commands/req.py", line 715, in request
cert = self.interface.request(csr, attributes)
File "/usr/local/lib/python3.10/dist-packages/Certipy-4.0.0-py3.10.egg/certipy/commands/req.py", line 208, in request
response = self.dce.request(request)
File "/usr/lib/python3/dist-packages/impacket/dcerpc/v5/rpcrt.py", line 880, in request
raise exception
certipy.commands.req.DCERPCSessionError: RequestSessionError: code: 0x80070057 - E_INVALIDARG - One or more arguments are invalid.

@ElizabethHanson1999
Copy link

ElizabethHanson1999 commented Nov 2, 2022

Got error: RequestSessionError: code: 0x80070057 - E_INVALIDARG - One or more arguments are invalid.

did you find the solution ?

@helloyw
Copy link
Author

helloyw commented Nov 2, 2022

出现错误:RequestSessionError:代码:0x80070057 - E_INVALIDARG - 一个或多个参数无效。

你找到解决方案了吗?

sorry, I didn't find a solution

@ly4k
Copy link
Owner

ly4k commented Nov 2, 2022

Hello everyone. This error usually comes from an invalid CA name. The CA name must match a valid one and cannot be just a DNS name or something close to the actual CA name. The CA name can be found in the output from the "find" command. Please let me know if this fixes the issue. Otherwise, you can send me a private message with some more specific details about the environment. The information provided for now is not enough for me to debug the issue.

Best regards

@helloyw
Copy link
Author

helloyw commented Nov 3, 2022

Hello everyone. This error usually comes from an invalid CA name. The CA name must match a valid one and cannot be just a DNS name or something close to the actual CA name. The CA name can be found in the output from the "find" command. Please let me know if this fixes the issue. Otherwise, you can send me a private message with some more specific details about the environment. The information provided for now is not enough for me to debug the issue.

Best regards

ok, thank you for your reply

@helloyw helloyw closed this as completed Nov 3, 2022
@ElizabethHanson1999
Copy link

I tried that agian and i got "netbios connection timeout" this time :

Certipy v4.0.0 - by Oliver Lyak (ly4k)

[+] Trying to resolve 'EXAMPLE.COM' at '192.168.17.139'
[+] Resolved 'EXAMPLE.COM' from cache: 192.168.17.139
[+] Generating RSA key
[*] Requesting certificate via RPC
[+] Trying to connect to endpoint: ncacn_np:192.168.17.139[\pipe\cert]
[+] Connected to endpoint: ncacn_np:192.168.17.139[\pipe\cert]
[-] Got error: The NETBIOS connection with the remote host timed out.
Traceback (most recent call last):
File "C:\Users\test2\Desktop\Certipy-main\Certipy-main\certipy\lib\site-packages\impacket-0.10.0-py3.10.egg\impacket\nmb.py", line 984, in non_polling_read
received = self._sock.recv(bytes_left)
TimeoutError: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\test2\Desktop\Certipy-main\Certipy-main\certipy\lib\site-packages\certipy-4.0.0-py3.10.egg\certipy\entry.py", line 60, in main
actionsoptions.action
File "C:\Users\test2\Desktop\Certipy-main\Certipy-main\certipy\lib\site-packages\certipy-4.0.0-py3.10.egg\certipy\commands\parsers\req.py", line 12, in entry
req.entry(options)
File "C:\Users\test2\Desktop\Certipy-main\Certipy-main\certipy\lib\site-packages\certipy-4.0.0-py3.10.egg\certipy\commands\req.py", line 764, in entry
request.request()
File "C:\Users\test2\Desktop\Certipy-main\Certipy-main\certipy\lib\site-packages\certipy-4.0.0-py3.10.egg\certipy\commands\req.py", line 715, in request
cert = self.interface.request(csr, attributes)
File "C:\Users\test2\Desktop\Certipy-main\Certipy-main\certipy\lib\site-packages\certipy-4.0.0-py3.10.egg\certipy\commands\req.py", line 208, in request
response = self.dce.request(request)
File "C:\Users\test2\Desktop\Certipy-main\Certipy-main\certipy\lib\site-packages\impacket-0.10.0-py3.10.egg\impacket\dcerpc\v5\rpcrt.py", line 859, in request
answer = self.recv()
File "C:\Users\test2\Desktop\Certipy-main\Certipy-main\certipy\lib\site-packages\impacket-0.10.0-py3.10.egg\impacket\dcerpc\v5\rpcrt.py", line 1310, in recv
response_data = self._transport.recv(forceRecv, count=MSRPCRespHeader._SIZE)
File "C:\Users\test2\Desktop\Certipy-main\Certipy-main\certipy\lib\site-packages\impacket-0.10.0-py3.10.egg\impacket\dcerpc\v5\transport.py", line 553, in recv
return self.__smb_connection.readFile(self.__tid, self.__handle)
File "C:\Users\test2\Desktop\Certipy-main\Certipy-main\certipy\lib\site-packages\impacket-0.10.0-py3.10.egg\impacket\smbconnection.py", line 570, in readFile
bytesRead = self._SMBConnection.read_andx(treeId, fileId, offset, toRead)
File "C:\Users\test2\Desktop\Certipy-main\Certipy-main\certipy\lib\site-packages\impacket-0.10.0-py3.10.egg\impacket\smb3.py", line 1979, in read_andx
return self.read(tid, fid, offset, max_size, wait_answer)
File "C:\Users\test2\Desktop\Certipy-main\Certipy-main\certipy\lib\site-packages\impacket-0.10.0-py3.10.egg\impacket\smb3.py", line 1314, in read
ans = self.recvSMB(packetID)
File "C:\Users\test2\Desktop\Certipy-main\Certipy-main\certipy\lib\site-packages\impacket-0.10.0-py3.10.egg\impacket\smb3.py", line 458, in recvSMB
data = self._NetBIOSSession.recv_packet(self._timeout)
File "C:\Users\test2\Desktop\Certipy-main\Certipy-main\certipy\lib\site-packages\impacket-0.10.0-py3.10.egg\impacket\nmb.py", line 915, in recv_packet
data = self.__read(timeout)
File "C:\Users\test2\Desktop\Certipy-main\Certipy-main\certipy\lib\site-packages\impacket-0.10.0-py3.10.egg\impacket\nmb.py", line 1002, in __read
data = self.read_function(4, timeout)
File "C:\Users\test2\Desktop\Certipy-main\Certipy-main\certipy\lib\site-packages\impacket-0.10.0-py3.10.egg\impacket\nmb.py", line 986, in non_polling_read
raise NetBIOSTimeout
impacket.nmb.NetBIOSTimeout: The NETBIOS connection with the remote host timed out.

@maseehabdul
Copy link

maseehabdul commented Dec 11, 2023

certipy-ad req -username 'svc_admin$' -password 'demo@123' -ca 'AUTHORITY-CA' -target 10.10.11.222 -template 'CorpVPN' -upn "administrator@authority.htb" -dns authority.authority.htb -debug
Certipy v4.7.0 - by Oliver Lyak (ly4k)

[+] Trying to resolve '' at '183.82.243.66'
[+] Generating RSA key
[*] Requesting certificate via RPC
[+] Trying to connect to endpoint: ncacn_np:10.10.11.222[\pipe\cert]
[!] Failed to connect to endpoint ncacn_np:10.10.11.222[\pipe\cert]: SMB SessionError: STATUS_ACCESS_DENIED({Access Denied} A process has requested access to an object but has not been granted those access rights.)
[+] Trying to resolve dynamic endpoint '91AE6020-9E3C-11CF-8D7C-00AA00C091BE'
[+] Resolved dynamic endpoint '91AE6020-9E3C-11CF-8D7C-00AA00C091BE' to 'ncacn_ip_tcp:10.10.11.222[49716]'
[+] Trying to connect to endpoint: ncacn_ip_tcp:10.10.11.222[49716]
[+] Connected to endpoint: ncacn_ip_tcp:10.10.11.222[49716]
[-] Got error: Unknown DCE RPC fault status code: 00000721
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/certipy/entry.py", line 60, in main
actionsoptions.action
File "/usr/lib/python3/dist-packages/certipy/commands/parsers/req.py", line 12, in entry
req.entry(options)
File "/usr/lib/python3/dist-packages/certipy/commands/req.py", line 767, in entry
request.request()
File "/usr/lib/python3/dist-packages/certipy/commands/req.py", line 718, in request
cert = self.interface.request(csr, attributes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/certipy/commands/req.py", line 208, in request
response = self.dce.request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/impacket/dcerpc/v5/rpcrt.py", line 859, in request
answer = self.recv()
^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/impacket/dcerpc/v5/rpcrt.py", line 1332, in recv
raise DCERPCException('Unknown DCE RPC fault status code: %.8x' % status_code)
impacket.dcerpc.v5.rpcrt.DCERPCException: Unknown DCE RPC fault status code: 00000721

i didnt get a solution that solution not work for me

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

4 participants