edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Kevin Carhart <kevin@carhart.net>
To: edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev] a technique for the find-and-fix
Date: Wed, 15 Jun 2016 18:45:51 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LRH.2.03.1606151830410.28484@carhart.net> (raw)



I'm excited to share a discovery about one way to go about tackling a big 
and arcane site.

When I'm sitting in jdb, the JS routines that have been digested into 
memory can be echoed:

* ok(window)

a,b,c,d,e,f,blah

* blah

* function blah (a) { b = arcaneMethod(a) }

So then simple code injection is possible, so that the arguments to blah 
can become less opaque.  Just overwrite blah from the jdb command line:

* function blah (a) { exportable_a = a; b = arcaneMethod(a) }

Now I can find out about the arguments to blah:

* exportable_a

* [Object object]

And it will also be legal to pipe this argument back in:

* blah(exportable_a)

And it will also be legal to try things from that function step by step 
like:

* b=arcaneMethod(exportable_a)

In case I know blah produces a runtime error but I don't know which of 
its six subsidiary calls raises the error, now I can try each one and get 
down to the root cause more quickly!

Kevin






             reply	other threads:[~2016-06-16  1:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16  1:45 Kevin Carhart [this message]
2016-06-22  1:18 ` [Edbrowse-dev] deobfuscate(js_text) Kevin Carhart
2016-06-22 11:54   ` [Edbrowse-dev] OT: Fastmail and the good old days Chuck Hallenbeck
2016-06-22 12:11   ` [Edbrowse-dev] OT: Fastmail and the good old days (correction) Chuck Hallenbeck
2016-06-23 10:26     ` Kevin Carhart
2016-06-22 12:24   ` [Edbrowse-dev] deobfuscate(js_text) Karl Dahlke
2016-06-23 10:13     ` Kevin Carhart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LRH.2.03.1606151830410.28484@carhart.net \
    --to=kevin@carhart.net \
    --cc=edbrowse-dev@lists.the-brannons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).