<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: hacking</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/hacking.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2021-03-01T19:12:03+00:00</updated><author><name>Simon Willison</name></author><entry><title>How I cut GTA Online loading times by 70%</title><link href="https://simonwillison.net/2021/Mar/1/gta-loading-times/#atom-tag" rel="alternate"/><published>2021-03-01T19:12:03+00:00</published><updated>2021-03-01T19:12:03+00:00</updated><id>https://simonwillison.net/2021/Mar/1/gta-loading-times/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="https://nee.lv/2021/02/28/How-I-cut-GTA-Online-loading-times-by-70/"&gt;How I cut GTA Online loading times by 70%&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Incredible debugging war story:  t0st was fed up of waiting six minutes (!) for GTA Online to load on their PC, so they used a host of devious debugging tricks to try and figure out what was going on. It turned out the game was loading a 10MB JSON file detailing all of the available in-game purchases, but inefficient JSON parsing meant it was pegging an entire CPU for 4 minutes mainly running the strlen() C function. Despite not having access to source code or debugging symbols t0st figured out the problem and managed to inject a custom DLL that hooked some internal functions and dropped load times down from 6m down to to 1m50s!

    &lt;p&gt;&lt;small&gt;&lt;/small&gt;Via &lt;a href="https://news.ycombinator.com/item?id=26296339"&gt;Hacker News&lt;/a&gt;&lt;/small&gt;&lt;/p&gt;


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/debugger"&gt;debugger&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/hacking"&gt;hacking&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/profiling"&gt;profiling&lt;/a&gt;&lt;/p&gt;



</summary><category term="debugger"/><category term="hacking"/><category term="profiling"/></entry><entry><title>What is the best resource for someone who is non-technical to learn about computer programming/creating software?</title><link href="https://simonwillison.net/2013/Aug/8/what-is-the-best/#atom-tag" rel="alternate"/><published>2013-08-08T18:44:00+00:00</published><updated>2013-08-08T18:44:00+00:00</updated><id>https://simonwillison.net/2013/Aug/8/what-is-the-best/#atom-tag</id><summary type="html">
    &lt;p&gt;&lt;em&gt;My answer to &lt;a href="https://www.quora.com/What-is-the-best-resource-for-someone-who-is-non-technical-to-learn-about-computer-programming-creating-software/answer/Simon-Willison"&gt;What is the best resource for someone who is non-technical to learn about computer programming/creating software?&lt;/a&gt; on Quora&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Learn to program. You don't need to learn programming to the standard where you could work professionally as a software engineer, but having enough programming knowledge to write some simple programs and automate some simple tasks will make you enormously more capable when it comes to working with programmers - or in business life in general.&lt;/p&gt;

&lt;p&gt;Think about it like learning to write: being able to draft effective emails, blog posts and press releases is a valuable skill for any businessperson, even if you don't write professionally to the standard required to produce magazine articles and novels.&lt;/p&gt;

&lt;p&gt;As for the best resource... &lt;span&gt;&lt;a href="http://www.codecademy.com/"&gt;Code Academy&lt;/a&gt;&lt;/span&gt; is worth a look as a starting point.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/enterprise"&gt;enterprise&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/entrepreneurship"&gt;entrepreneurship&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/hacking"&gt;hacking&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/programmers"&gt;programmers&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/programming"&gt;programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/software-engineering"&gt;software-engineering&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/startups"&gt;startups&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/quora"&gt;quora&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="enterprise"/><category term="entrepreneurship"/><category term="hacking"/><category term="programmers"/><category term="programming"/><category term="software-engineering"/><category term="startups"/><category term="quora"/></entry><entry><title>What steps can I take to protect my data in case my laptop gets stolen?</title><link href="https://simonwillison.net/2013/Aug/7/what-steps-can-i/#atom-tag" rel="alternate"/><published>2013-08-07T09:51:00+00:00</published><updated>2013-08-07T09:51:00+00:00</updated><id>https://simonwillison.net/2013/Aug/7/what-steps-can-i/#atom-tag</id><summary type="html">
    &lt;p&gt;&lt;em&gt;My answer to &lt;a href="https://www.quora.com/What-steps-can-I-take-to-protect-my-data-in-case-my-laptop-gets-stolen/answer/Simon-Willison"&gt;What steps can I take to protect my data in case my laptop gets stolen?&lt;/a&gt; on Quora&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Set up full drive encryption - that way if someone steals your laptop they won't be able to access your data without a password.&lt;/p&gt;

&lt;p&gt;Keep the files you can't afford to lose in Dropbox (if you are working on then on the road) so they are constantly backed up in case if theft. Your Dropbox folder will be safely encrypted along with the rest of your drive. You do need to trust Dropbox though.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/hacking"&gt;hacking&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/internet"&gt;internet&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/security"&gt;security&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/travel"&gt;travel&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/quora"&gt;quora&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="hacking"/><category term="internet"/><category term="security"/><category term="travel"/><category term="quora"/></entry><entry><title>Hackers: Who is a good speaker or author on hacktivism and/or the recent events of leaking confidential information?</title><link href="https://simonwillison.net/2013/Jul/25/hackers-who-is-a/#atom-tag" rel="alternate"/><published>2013-07-25T09:33:00+00:00</published><updated>2013-07-25T09:33:00+00:00</updated><id>https://simonwillison.net/2013/Jul/25/hackers-who-is-a/#atom-tag</id><summary type="html">
    &lt;p&gt;&lt;em&gt;My answer to &lt;a href="https://www.quora.com/Hackers-Who-is-a-good-speaker-or-author-on-hacktivism-and-or-the-recent-events-of-leaking-confidential-information/answer/Simon-Willison"&gt;Hackers: Who is a good speaker or author on hacktivism and/or the recent events of leaking confidential information?&lt;/a&gt; on Quora&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Danny O'Brien comes to mind. He's worked for the EFF and the Committee to Protect Journalists, is fully immersed in hacker culture and is a fantastic speaker: &lt;span&gt;&lt;a href="http://en.wikipedia.org/wiki/Danny_O'Brien"&gt;http://en.wikipedia.org/wiki/Dan...&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/hacking"&gt;hacking&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/speaking"&gt;speaking&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/wikileaks"&gt;wikileaks&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/quora"&gt;quora&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/ted"&gt;ted&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="hacking"/><category term="speaking"/><category term="wikileaks"/><category term="quora"/><category term="ted"/></entry><entry><title>How are websites hacked to have their content defaced? How can I prevent such attacks on my website?</title><link href="https://simonwillison.net/2012/Dec/4/how-are-websites-hacked/#atom-tag" rel="alternate"/><published>2012-12-04T14:35:00+00:00</published><updated>2012-12-04T14:35:00+00:00</updated><id>https://simonwillison.net/2012/Dec/4/how-are-websites-hacked/#atom-tag</id><summary type="html">
    &lt;p&gt;&lt;em&gt;My answer to &lt;a href="https://www.quora.com/How-are-websites-hacked-to-have-their-content-defaced-How-can-I-prevent-such-attacks-on-my-website/answer/Simon-Willison"&gt;How are websites hacked to have their content defaced? How can I prevent such attacks on my website?&lt;/a&gt; on Quora&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;There are countless ways in which a website could be defaced - way too many for a single Quora answer!&lt;/p&gt;

&lt;p&gt;Here are a few off the top of my head:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;An unpatched operating system with vulnerabilities in system services (SSH daemons, web servers, other procceses). Defence is to make sure you keep your packages up to date and avoid running anything exotic that might not be actively maintained.&lt;/li&gt;&lt;li&gt;XSS attacks. Make sure you have a deep understanding of what XSS is and how it works, and ideally use a template language that escapes output by default to help avoid the most obvious problems.&lt;/li&gt;&lt;li&gt;SQL injection attacks. Make sure you use a library that paramaterises SQL queries and handles escaping correctly for you, NEVER append strings together to create a SQL statement.&lt;/li&gt;&lt;li&gt;Sniffing your administrative username/password or even your authenticated cookie over an insecure WiFi network - make sure you only ever send those things over HTTPS.&lt;/li&gt;&lt;li&gt;Brute force attacks on your administrative login screen - make sure you rate limit login attempts.&lt;/li&gt;&lt;li&gt;Guessing your server's SSH password (or your admin interface password) - use a one-time, random password stored securely in something like 1password and ideally don't have SSH passwords at all, use SSH public-key authentication instead.&lt;/li&gt;&lt;li&gt;Serving JavaScript on the page from another URL (e.g. an externally hosted JavaScript library or an advertising network) which gets compromised. It doesn't matter how good your own site security is if you link to insecure JavaScript from a third party.&lt;/li&gt;&lt;/ul&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/hacking"&gt;hacking&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/internet"&gt;internet&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sql-injection"&gt;sql-injection&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/quora"&gt;quora&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="hacking"/><category term="internet"/><category term="sql-injection"/><category term="quora"/></entry><entry><title>What are the best practices to avoid XSS and SQL Injections attacks (platform agnostic)?</title><link href="https://simonwillison.net/2012/Feb/4/what-are-the-best-xss-practices/#atom-tag" rel="alternate"/><published>2012-02-04T11:43:00+00:00</published><updated>2012-02-04T11:43:00+00:00</updated><id>https://simonwillison.net/2012/Feb/4/what-are-the-best-xss-practices/#atom-tag</id><summary type="html">
    &lt;p&gt;&lt;em&gt;My answer to &lt;a href="https://www.quora.com/What-are-the-best-practices-to-avoid-XSS-and-SQL-Injections-attacks-platform-agnostic/answer/Simon-Willison"&gt;What are the best practices to avoid XSS and SQL Injections attacks (platform agnostic)?&lt;/a&gt; on Quora&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Input validation is, in my opinion, a red herring. Sure - if you ask the user for an integer or date you should make sure they entered one before attempting to save it anywhere or use it for processing, but injection attacks often involve text fields (e.g. names, or comments posted on Quora) and validating those on input is a recipe for banning "Tim O'Reilly" from ever creating a proper profile on your site!&lt;/p&gt;

&lt;p&gt;The most important thing you can do to avoid XSS/SQLi is this: &lt;b&gt;never concatenate strings&lt;/b&gt;. Any time you find yourself concatenating strings together, especially if those strings are executable code in another language (like SQL, or HTML, or JavaScript, or something being passed to a command line), you're risking a potential injection attack. Sure you can escape stuff during the concatenation with addslashes / htmlentities / PHP's hilariously named mysql_real_escape_string / whatever escaping function you have to hand, but one tiny mistake will destroy the security of your application.&lt;/p&gt;

&lt;p&gt;Instead, you should use abstractions that handle escaping for you. Both Django and Rails have escape-by-default templating languages, which go a LONG way towards protecting against accidental XSS. Good ORM or database abstraction layers will handle SQL escaping for you - if you don't have one, you can write something yourself pretty quickly (here's the most basic thing that would work: "$results = $mydb-&amp;gt;execute("SELECT * FROM TABLE WHERE user = %user", {"user": "simon"});)&lt;/p&gt;

&lt;p&gt;SQL injections are so easy to protect against it's embarrassing to us as an industry that they still show up in any applications. XSS protection requires a bit more work, but template languages that escape by default really do cover 95% of the cases without any extra development effort.&lt;/p&gt;

&lt;p&gt;And as &lt;span&gt;&lt;a href="https://www.quora.com/profile/Mike-Fratto"&gt;Mike Fratto&lt;/a&gt;&lt;/span&gt; said, the OWASP guides are invaluable.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/hacking"&gt;hacking&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/security"&gt;security&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sql-injection"&gt;sql-injection&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/xss"&gt;xss&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/quora"&gt;quora&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="hacking"/><category term="security"/><category term="sql-injection"/><category term="xss"/><category term="quora"/></entry><entry><title>What are some things that most hackers used to do themselves but now use other people's software to do?</title><link href="https://simonwillison.net/2010/Nov/27/what-are-some-things/#atom-tag" rel="alternate"/><published>2010-11-27T15:49:00+00:00</published><updated>2010-11-27T15:49:00+00:00</updated><id>https://simonwillison.net/2010/Nov/27/what-are-some-things/#atom-tag</id><summary type="html">
    &lt;p&gt;&lt;em&gt;My answer to &lt;a href="https://www.quora.com/What-are-some-things-that-most-hackers-used-to-do-themselves-but-now-use-other-peoples-software-to-do/answer/Simon-Willison"&gt;What are some things that most hackers used to do themselves but now use other people&amp;#39;s software to do?&lt;/a&gt; on Quora&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Renting co-located servers. These days, most people just use virtual machines for their own personal projects.&lt;/p&gt;
    
        &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/hacking"&gt;hacking&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/quora"&gt;quora&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/diy"&gt;diy&lt;/a&gt;&lt;/p&gt;
    

</summary><category term="hacking"/><category term="quora"/><category term="diy"/></entry><entry><title>Developing for the Apple iPhone using Flash</title><link href="https://simonwillison.net/2009/Oct/5/adobe/#atom-tag" rel="alternate"/><published>2009-10-05T21:15:45+00:00</published><updated>2009-10-05T21:15:45+00:00</updated><id>https://simonwillison.net/2009/Oct/5/adobe/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.adobe.com/devnet/logged_in/abansod_iphone.html"&gt;Developing for the Apple iPhone using Flash&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
A brilliant feat of engineering: Adobe worked around Apple’s “no runtime allowed” rules by writing a compiler front end for LLVM that compiles ActionScript 3 to ARM assembly code, and apparently ported the regular Flash drawing APIs as well.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/actionscript"&gt;actionscript&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/adobe"&gt;adobe&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/compilers"&gt;compilers&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/flash"&gt;flash&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/hacking"&gt;hacking&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/iphone"&gt;iphone&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/llvm"&gt;llvm&lt;/a&gt;&lt;/p&gt;



</summary><category term="actionscript"/><category term="adobe"/><category term="compilers"/><category term="flash"/><category term="hacking"/><category term="iphone"/><category term="llvm"/></entry><entry><title>Weak Password Brings "Happiness" to Twitter Hacker</title><link href="https://simonwillison.net/2009/Jan/7/weak/#atom-tag" rel="alternate"/><published>2009-01-07T12:04:56+00:00</published><updated>2009-01-07T12:04:56+00:00</updated><id>https://simonwillison.net/2009/Jan/7/weak/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://blog.wired.com/27bstroke6/2009/01/professed-twitt.html"&gt;Weak Password Brings &amp;quot;Happiness&amp;quot; to Twitter Hacker&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
The full story on the Twitter admin account hack. I bet there are a LOT of web applications out there that don’t track and rate-limit failed password attempts.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/hacking"&gt;hacking&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/passwords"&gt;passwords&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/security"&gt;security&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/twitter"&gt;twitter&lt;/a&gt;&lt;/p&gt;



</summary><category term="hacking"/><category term="passwords"/><category term="security"/><category term="twitter"/></entry><entry><title>Quoting Kim Zetter</title><link href="https://simonwillison.net/2008/Sep/18/palin/#atom-tag" rel="alternate"/><published>2008-09-18T22:23:59+00:00</published><updated>2008-09-18T22:23:59+00:00</updated><id>https://simonwillison.net/2008/Sep/18/palin/#atom-tag</id><summary type="html">
    &lt;blockquote cite="http://blog.wired.com/27bstroke6/2008/09/palin-e-mail-ha.html"&gt;&lt;p&gt;The Palin hack didn't require any real skill. Instead, the hacker simply reset Palin's password using her birthdate, ZIP code and information about where she met her spouse - the security question on her Yahoo account, which was answered (Wasilla High) by a simple Google search.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p class="cite"&gt;&amp;mdash; &lt;a href="http://blog.wired.com/27bstroke6/2008/09/palin-e-mail-ha.html"&gt;Kim Zetter&lt;/a&gt;, Wired&lt;/p&gt;

    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/hacking"&gt;hacking&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/passwords"&gt;passwords&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/sarahpalin"&gt;sarahpalin&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/security"&gt;security&lt;/a&gt;&lt;/p&gt;



</summary><category term="hacking"/><category term="passwords"/><category term="sarahpalin"/><category term="security"/></entry><entry><title>Brad Neuberg's Personal Research Agenda</title><link href="https://simonwillison.net/2007/Aug/23/coding/#atom-tag" rel="alternate"/><published>2007-08-23T01:40:44+00:00</published><updated>2007-08-23T01:40:44+00:00</updated><id>https://simonwillison.net/2007/Aug/23/coding/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://codinginparadise.org/weblog/2007/08/creating-personal-research-agenda.html"&gt;Brad Neuberg&amp;#x27;s Personal Research Agenda&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Inspiring; lots of interesting problems to solve. I also liked the idea of moving to Thailand during a tech downturn and hacking on interesting projects while spending $200/month on living costs.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/brad-neuberg"&gt;brad-neuberg&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/hacking"&gt;hacking&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/programming"&gt;programming&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/thailand"&gt;thailand&lt;/a&gt;&lt;/p&gt;



</summary><category term="brad-neuberg"/><category term="hacking"/><category term="programming"/><category term="thailand"/></entry><entry><title>Quoting Jacques Erasmus</title><link href="https://simonwillison.net/2007/Feb/4/blackmarket/#atom-tag" rel="alternate"/><published>2007-02-04T19:06:03+00:00</published><updated>2007-02-04T19:06:03+00:00</updated><id>https://simonwillison.net/2007/Feb/4/blackmarket/#atom-tag</id><summary type="html">
    &lt;blockquote cite="http://news.bbc.co.uk/2/hi/programmes/click_online/4423733.stm"&gt;&lt;p&gt;If you found a hole in software that millions of people use, and is very high profile, you can sell that to the highest bidder for perhaps one or two million dollars.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p class="cite"&gt;&amp;mdash; &lt;a href="http://news.bbc.co.uk/2/hi/programmes/click_online/4423733.stm"&gt;Jacques Erasmus&lt;/a&gt;&lt;/p&gt;

    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/bbcnews"&gt;bbcnews&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/blackmarket"&gt;blackmarket&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/exploits"&gt;exploits&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/hacking"&gt;hacking&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/security"&gt;security&lt;/a&gt;&lt;/p&gt;



</summary><category term="bbcnews"/><category term="blackmarket"/><category term="exploits"/><category term="hacking"/><category term="security"/></entry></feed>