internet hacking
Guessing forgotten password and breaking into own online account
<p>If you have an online account and forget the password, are you allowed to guess it? What if you automate the process, like in a brute force attack? Can other things, like the verification code be guessed too? </p>

<p>If relevant I'm wondering about Twitter in particular. </p>

<p>If the website and its login are designed competently, then experienced hackers can't in practice access your account without knowing your login, and therefore you can't. If they gain access, then by attacking the whole site in a way that would be illegal for you, when you're genuinely trying to access your own account. </p>

<p>You may be violating their terms of service by using a bot. And they may take counter measures, like banning your IP address, assuming it's a hacker trying to break into your account. "Guessing" should be fine, but don't try to be too smart: A bot isn't "guessing". </p>

<h1>"Is X legal" questions are hard. At a guess, though: probably. In general.</h1>

<p>The best we can generally do on an "is X legal" question is think about all of the ways in which X might not be legal. I'm going to assume US jurisdiction; know that most legal considerations here vary widely from one jurisdiction to another. </p>

<h3>Criminal liability</h3>

<p>Maybe you're violating some criminal law. Individual states may very well have some kind of weird laws, but on the federal level the main one to worry about is the Computer Fraud and Abuse Act (CFAA), 18 U.S.C. § 1030. It proscribes a variety of acts, but the broadest is:</p>

<blockquote>
  <p>intentionally access[ing] a computer without authorization or exceed[ing] authorized access, and thereby obtain[ing]... information from any protected computer</p>
</blockquote>

<p>The term "protected computer" has expanded to include virtually any computer connected to the internet. The question, then, is whether the access described in the question is "unauthorized," or constitutes "exceed[ing] authorized access." The law seems to be (see the DoJ's official guidance, <a href="https://www.justice.gov/sites/default/files/criminal-ccips/legacy/2015/01/14/ccmanual.pdf" rel="nofollow noreferrer">https://www.justice.gov/sites/default/files/criminal-ccips/legacy/2015/01/14/ccmanual.pdf</a>) that a ToS agreement constitutes a limit on access and, therefore, that access in violation of a ToS agreement is prohibited by the CFAA. This will in turn depend on the specific service with which we're concerned. </p>

<h3>Civil liability: breach of contract edition</h3>

<p>Maybe you've formed a legally binding contract with the service you're trying to "hack," which contract prohibits your conduct. Certainly, most ToS agreements purport to be contracts, and courts have generally held that clickwrap agreements (of the sort to which you agree when you create an account, for instance), can be legally binding. Such a contract is probably a "contract of adhesion," (see WEX: <a href="https://www.law.cornell.edu/wex/adhesion_contract_contract_of_adhesion" rel="nofollow noreferrer">https://www.law.cornell.edu/wex/adhesion_contract_contract_of_adhesion</a>), meaning that some terms can be voided for unconscionability more easily than in a normal contract. In this light, a term prohibiting brute-forcing an authentication credential would probably be held to be conscionable; a term prohibiting guessing your own might not.</p>

<p>Of course, as a practical matter, it's nearly impossible that a company could prove any damages resulting from the kind of unorthodox password recovery techniques described in your question.</p>

<h3>So, for Twitter in particular, what violates the ToS?</h3>

<p>Per the ToS itself:</p>

<blockquote>
  <p>You also agree not to misuse our Services, for example, by interfering with them or accessing them using a method other than the interface and the instructions that we provide.  You may not do any of the following while accessing or using the Services: (i) access, tamper with, or use non-public areas of the Services, Twitter’s computer systems, or the technical delivery systems of Twitter’s providers; (ii) probe, scan, or test the vulnerability of any system or network or breach or <b>circumvent any security or authentication measures</b>; </p>
</blockquote>

<p>Thus I would say that (probably) CFAA violations could arise with an automated bot attempting to brute-force any authentication credential (verification code or password). </p>

<p><h1>I am not a lawyer. I am most especially not YOUR lawyer. If you want legal advice, hire a lawyer.</h1>Also, as a practical matter, one assumes any decently-designed service has some protection in place against brute-forcing passwords via the web interface.</p>
