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

Stack Trace When Stepping Through Functions #70

Closed
gwillcox-r7 opened this issue Nov 1, 2022 · 2 comments · May be fixed by Shopify/debug#14
Closed

Stack Trace When Stepping Through Functions #70

gwillcox-r7 opened this issue Nov 1, 2022 · 2 comments · May be fixed by Shopify/debug#14

Comments

@gwillcox-r7
Copy link

Getting the following stack trace when trying to step through the line ace_header = ace[:header]:

image

Here is the stack trace:

msf6 auxiliary(gather/ldap_esc_vulnerable_cert_finder) > run
[*] Running module against 172.20.240.201

[*] Discovering base DN automatically
[+] 172.20.240.201:389 Discovered base DN: DC=daforest,DC=com
["DEBUGGER Exception: /home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.6.3/lib/debug/thread_client.rb:1108",
 #<ArgumentError: wrong number of arguments (given 0, expected 1)>,
 ["/home/gwillcox/git/metasploit-framework/lib/rex/proto/ms_dtyp.rb:105:in `name'",
  "/home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.6.3/lib/debug/server_dap.rb:949:in `variable_'",
  "/home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.6.3/lib/debug/server_dap.rb:971:in `variable'",
  "/home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.6.3/lib/debug/server_dap.rb:765:in `block in process_dap'",
  "/home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.6.3/lib/debug/server_dap.rb:764:in `map'",
  "/home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.6.3/lib/debug/server_dap.rb:764:in `process_dap'",
  "/home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.6.3/lib/debug/thread_client.rb:1097:in `wait_next_action_'",
  "/home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.6.3/lib/debug/thread_client.rb:797:in `wait_next_action'",
  "/home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.6.3/lib/debug/thread_client.rb:310:in `suspend'",
  "/home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.6.3/lib/debug/thread_client.rb:344:in `block in step_tp'",
  "/home/gwillcox/git/metasploit-framework/modules/auxiliary/gather/ldap_esc_vulnerable_cert_finder.rb:57:in `block in parse_dacl_or_sacl'",
  "/home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bindata-2.4.13/lib/bindata/array.rb:220:in `block in each'",
  "/home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bindata-2.4.13/lib/bindata/array.rb:220:in `each'",
  "/home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bindata-2.4.13/lib/bindata/array.rb:220:in `each'",
  "/home/gwillcox/git/metasploit-framework/modules/auxiliary/gather/ldap_esc_vulnerable_cert_finder.rb:55:in `parse_dacl_or_sacl'",
  "/home/gwillcox/git/metasploit-framework/modules/auxiliary/gather/ldap_esc_vulnerable_cert_finder.rb:212:in `block in find_esc1_vuln_cert_templates'",
  "/home/gwillcox/git/metasploit-framework/modules/auxiliary/gather/ldap_esc_vulnerable_cert_finder.rb:203:in `each'",
  "/home/gwillcox/git/metasploit-framework/modules/auxiliary/gather/ldap_esc_vulnerable_cert_finder.rb:203:in `find_esc1_vuln_cert_templates'",
  "/home/gwillcox/git/metasploit-framework/modules/auxiliary/gather/ldap_esc_vulnerable_cert_finder.rb:395:in `run'",
  "/home/gwillcox/git/metasploit-framework/lib/msf/base/simple/auxiliary.rb:178:in `job_run_proc'",
  "/home/gwillcox/git/metasploit-framework/lib/msf/base/simple/auxiliary.rb:85:in `run_simple'",
  "/home/gwillcox/git/metasploit-framework/lib/msf/base/simple/auxiliary.rb:96:in `run_simple'",
  "/home/gwillcox/git/metasploit-framework/lib/msf/ui/console/command_dispatcher/auxiliary.rb:82:in `block in cmd_run'",
  "/home/gwillcox/git/metasploit-framework/lib/msf/core/rhosts_walker.rb:62:in `block in each'",
  "/home/gwillcox/git/metasploit-framework/lib/msf/core/rhosts_walker.rb:151:in `<<'",
  "/home/gwillcox/git/metasploit-framework/lib/msf/core/rhosts_walker.rb:151:in `block (3 levels) in parse'",
  "/home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/rex-socket-0.1.43/lib/rex/socket/range_walker.rb:234:in `each_host'",
  "/home/gwillcox/git/metasploit-framework/lib/msf/core/rhosts_walker.rb:146:in `block (2 levels) in parse'",
  "/home/gwillcox/git/metasploit-framework/lib/msf/core/rhosts_walker.rb:114:in `each'",
  "/home/gwillcox/git/metasploit-framework/lib/msf/core/rhosts_walker.rb:114:in `block in parse'",
  "/home/gwillcox/git/metasploit-framework/lib/msf/core/rhosts_walker.rb:61:in `each'",
  "/home/gwillcox/git/metasploit-framework/lib/msf/core/rhosts_walker.rb:61:in `each'",
  "/home/gwillcox/git/metasploit-framework/lib/msf/core/rhosts_walker.rb:61:in `each'",
  "/home/gwillcox/git/metasploit-framework/lib/msf/ui/console/command_dispatcher/auxiliary.rb:78:in `cmd_run'",
  "/home/gwillcox/git/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:581:in `run_command'",
  "/home/gwillcox/git/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:530:in `block in run_single'",
  "/home/gwillcox/git/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:524:in `each'",
  "/home/gwillcox/git/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:524:in `run_single'",
  "/home/gwillcox/git/metasploit-framework/lib/rex/ui/text/shell.rb:162:in `run'",
  "/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in `start'",
  "/home/gwillcox/git/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'",
  "/home/gwillcox/git/metasploit-framework/msfconsole:23:in `<main>'"]]
[-] Auxiliary failed: ArgumentError wrong number of arguments (given 0, expected 1)
[-] Call stack:
[-]   /home/gwillcox/git/metasploit-framework/lib/rex/proto/ms_dtyp.rb:105:in `name'
[-]   /home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.6.3/lib/debug/server_dap.rb:949:in `variable_'
[-]   /home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.6.3/lib/debug/server_dap.rb:971:in `variable'
[-]   /home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.6.3/lib/debug/server_dap.rb:765:in `block in process_dap'
[-]   /home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.6.3/lib/debug/server_dap.rb:764:in `map'
[-]   /home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.6.3/lib/debug/server_dap.rb:764:in `process_dap'
[-]   /home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.6.3/lib/debug/thread_client.rb:1097:in `wait_next_action_'
[-]   /home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.6.3/lib/debug/thread_client.rb:797:in `wait_next_action'
[-]   /home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.6.3/lib/debug/thread_client.rb:310:in `suspend'
[-]   /home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/debug-1.6.3/lib/debug/thread_client.rb:344:in `block in step_tp'
[-]   /home/gwillcox/git/metasploit-framework/modules/auxiliary/gather/ldap_esc_vulnerable_cert_finder.rb:57:in `block in parse_dacl_or_sacl'
[-]   /home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bindata-2.4.13/lib/bindata/array.rb:220:in `block in each'
[-]   /home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bindata-2.4.13/lib/bindata/array.rb:220:in `each'
[-]   /home/gwillcox/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/bindata-2.4.13/lib/bindata/array.rb:220:in `each'
[-]   /home/gwillcox/git/metasploit-framework/modules/auxiliary/gather/ldap_esc_vulnerable_cert_finder.rb:55:in `parse_dacl_or_sacl'
[-]   /home/gwillcox/git/metasploit-framework/modules/auxiliary/gather/ldap_esc_vulnerable_cert_finder.rb:212:in `block in find_esc1_vuln_cert_templates'
[-]   /home/gwillcox/git/metasploit-framework/modules/auxiliary/gather/ldap_esc_vulnerable_cert_finder.rb:203:in `each'
[-]   /home/gwillcox/git/metasploit-framework/modules/auxiliary/gather/ldap_esc_vulnerable_cert_finder.rb:203:in `find_esc1_vuln_cert_templates'
[-]   /home/gwillcox/git/metasploit-framework/modules/auxiliary/gather/ldap_esc_vulnerable_cert_finder.rb:395:in `run'
[*] Auxiliary module execution completed
msf6 auxiliary(gather/ldap_esc_vulnerable_cert_finder) > 
@ko1
Copy link
Collaborator

ko1 commented Nov 2, 2022

https://github.com/ruby/debug/blob/v1.6.3/lib/debug/server_dap.rb#L949
It try to call Class#name but I'm not sure why it raises....
Anyway, I'll rescue it by fixing ruby/debug.

@ko1
Copy link
Collaborator

ko1 commented Nov 8, 2022

Maybe fixed.

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

Successfully merging a pull request may close this issue.

2 participants