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

NoMethodError When Attempting to Forward Intercepted Packets With Custom Class #4

Open
decal opened this issue Mar 21, 2019 · 0 comments

Comments

@decal
Copy link

decal commented Mar 21, 2019

The code listing that follows is a stack trace I encountered while reverse engineering MasterTrade via the web interface. I tried to patch it myself without any luck. It looks like the exception is actually a result of the FalseClass object being received from gems further down the stack. The command line and software versions are below.

proxy.rb:160       DEBUG proxy.send_message false

NoMethodError
undefined method `forward!' for false:FalseClass
/meta/d/decal/lib/ruby/gems/2.6.0/gems/binproxy-1.0.0/lib/binproxy/proxy.rb:1
61:in `send_message'
/meta/d/decal/lib/ruby/gems/2.6.0/gems/binproxy-1.0.0/lib/binproxy/web_consol
e.rb:129:in `onmessage'
/meta/d/decal/lib/ruby/gems/2.6.0/gems/binproxy-1.0.0/lib/binproxy/web_consol
e.rb:105:in `block in initialize'
/meta/d/decal/lib/ruby/gems/2.6.0/gems/em-websocket-0.3.8/lib/em-websocket/co
nnection.rb:19:in `trigger_on_message'
/meta/d/decal/lib/ruby/gems/2.6.0/gems/em-websocket-0.3.8/lib/em-websocket/me
ssage_processor_06.rb:45:in `message'
/meta/d/decal/lib/ruby/gems/2.6.0/gems/em-websocket-0.3.8/lib/em-websocket/fr
aming07.rb:106:in `process_data'
/meta/d/decal/lib/ruby/gems/2.6.0/gems/em-websocket-0.3.8/lib/em-websocket/ha
ndler.rb:28:in `receive_data'
/meta/d/decal/lib/ruby/gems/2.6.0/gems/em-websocket-0.3.8/lib/em-websocket/co
nnection.rb:71:in `receive_data'
/meta/d/decal/lib/ruby/gems/2.6.0/gems/sinatra-websocket-0.3.1/lib/sinatra-we
bsocket/ext/thin/connection.rb:38:in `receive_data_with_websocket'
/meta/d/decal/lib/ruby/gems/2.6.0/gems/sinatra-websocket-0.3.1/lib/sinatra-we
bsocket/ext/thin/connection.rb:65:in `receive_data_with_flash_policy_file'
/meta/d/decal/lib/ruby/gems/2.6.0/gems/eventmachine-1.0.9.1/lib/eventmachine.
rb:193:in `run_machine'
/meta/d/decal/lib/ruby/gems/2.6.0/gems/eventmachine-1.0.9.1/lib/eventmachine.
rb:193:in `run'
/meta/d/decal/lib/ruby/gems/2.6.0/gems/binproxy-1.0.0/bin/binproxy:126:in `<t
op (required)>'
/meta/d/decal/bin/binproxy:23:in `load'
/meta/d/decal/bin/binproxy:23:in `<main>'

I ran into this stack trace when running binproxy with a custom class file which I'm attaching:

ncc_packet.txt

Rename it from ncc_packet.txt to ncc_packet.rb and execute with:

binproxy -c NccPacket -D $IPADDR 6675 34.230.62.47 6675 -d

bash-4.1$ cat /etc/issue
CentOS release 6.10 (Final)
Kernel \r on an \m

bash-4.1$ ruby -v
ruby 2.6.1p33 (2019-01-30 revision 66950) [x86_64-linux]
bash-4.1$ gem -v
3.0.1
bash-4.1$ which ruby
/meta/d/decal/bin/ruby
bash-4.1$ gem list binproxy bindata

*** LOCAL GEMS ***

binproxy (1.0.0)

*** LOCAL GEMS ***

bindata (2.4.4, 2.1.0)
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