Live data from Hacker News

How does Facebook disable Developer Tools?

stackoverflow.com

51–60 of 90 posts

Re: How does Facebook disable Developer Tools?

#51
post #39
post #32

Earlier quoted context omitted.

I wouldn't trust any computer, then. It's the same as taking a bunch of code you have no idea how works, and paste it into CMD, then wondering why you just deleted C:/

I would indeed not trust any OS that allows you to erase the root filesystem without at least asking for the superuser password :)

Funny that Windows does not even allow Administrator to do it. Ubuntu on other side asks only for user password (sudo)

:-)

Re: How does Facebook disable Developer Tools?

#55
post #50

Earlier quoted context omitted.

In the snippet posted by tshadwell. The code outputs a string into the console via console.log(), then executes the snippet from the console via eval(). Presumably to avoid to avoid Facebook's protections against console copy\paste execution. Edit: I'm wrong. Need some sleep.

tshadwell did not post a code snippet he wrote. He posted a link to a site that demonstrates the sandbox that Facebook uses (I believe the Facebook engineer that wrote the Facebook implementation also owns escape.alf.nu). This code does not break out of the sandbox, it creates it.

I never claimed tshadwell wrote it, but you are correct, my skimming of the code was incorrect. It redirects the evaluated output of an escaped version of a string to the console.

Re: How does Facebook disable Developer Tools?

#56
post #54

Wouldn't it be just as simple for an attacker to persuade a victim to paste a string starting with "javascript:" into the URL bar?

Both FireFox and Chrome have been preventing that since around 2011; the pasted url is stripped of the "javascript:" part. But now the malicious instructions tell users to press "j" before pasting the url (which is missing the "j" at the start), which prevents the browsers from detecting and stripping the protocol, thus allowing the script execution.

Re: How does Facebook disable Developer Tools?

#57

Earlier quoted context omitted.

I thought it was obfuscated variable names, but it's a turkish word https://en.wiktionary.org/wiki/arkada%C5%9Flar (follower)

It means "friends". There are some functions named "get messages", "get friends", "get a random friend" and "post comment" too. Weird.

Not yeah I dont know why I thought this was about twitter so I only wrote follower (close semantics, and wiktionary listed both). So it's an i10n CRUD controller :)

Re: How does Facebook disable Developer Tools?

#58
post #21
post #3

Earlier quoted context omitted.

Why not a separate package altogether? That way the Chrome team can focus on Chrome, and the Developer Tools team can focus on producing a high-quality website debugger.

If scammers can get people to open the developer console and paste code, they can get them to install the "developer tools extension" and then open the console and paste code. Add all the warnings you want, the scammer will say "see what facebook doesn't want you to see!!!". This has been called the "dancing monkeys problem". People can really be manipulated into doing anything in order to see the dancing monkeys (ev…

https://en.wikipedia.org/wiki/Dancing_pigs

Never seen it called "dancing monkeys" - got a cite?

Re: How does Facebook disable Developer Tools?

#59
post #33

Earlier quoted context omitted.

I don't think it's as simple as that - there's a lot more damage you can do by copy-pasting arbitrary code obtained via a social engineering vector into the dev console, than right-clicking to save an asset. I'd consider this a genuine security issue, and wouldn't be surprised if the dev console at least got moved behind a lot more 'here be dragons' warnings. or hide it behind a turing-test-for-engineers ... 'solve t…

Something something security by obscurity something something.

This isn't anything to do with security by obscurity. This is like putting a cover over the launch missiles button.

Re: How does Facebook disable Developer Tools?

#60
post #33

I don't think Developer Tools are going to be able to allow overriding like this for long, or we're going to be seeing a lot of this on sites soon, just like the widespread right-click "disabling" of yesteryear.

I don't think it's as simple as that - there's a lot more damage you can do by copy-pasting arbitrary code obtained via a social engineering vector into the dev console, than right-clicking to save an asset. I'd consider this a genuine security issue, and wouldn't be surprised if the dev console at least got moved behind a lot more 'here be dragons' warnings. or hide it behind a turing-test-for-engineers ... 'solve t…

Web browsers had had the capability to execute javascript through the URL bar since as long as I can remember. Social engineers should be able to just bypass this by telling users to copy paste the following code, Control+L, type "javascript:" (chrome strips it when copy-pasting), Control+V, Enter.

    javascript:alert('hi ' + document.body.innerHTML);
If people can be tricked into executing code in the dev console, then why not this too?
Post reply on HN