<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>hacking on S Anand</title>
    <link>https://www.s-anand.net/blog/tag/hacking/</link>
    <description>Recent content in hacking on S Anand</description>
    <generator>Hugo -- 0.164.0</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 22 Nov 2024 10:38:11 +0000</lastBuildDate>
    <atom:link href="https://www.s-anand.net/blog/tag/hacking/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Why don&#39;t students hack exams when they can?</title>
      <link>https://www.s-anand.net/blog/why-dont-students-hack-exams-when-they-can/</link>
      <pubDate>Fri, 22 Nov 2024 10:38:09 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/why-dont-students-hack-exams-when-they-can/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;Why don&amp;rsquo;t students hack exams when they can?&#34; loading=&#34;lazy&#34; src=&#34;https://www.s-anand.net/blog/assets/calvin-tries-to-cheat-an-exam.webp&#34;&gt;&lt;/p&gt;
&lt;p&gt;This year, I created a series of tests for &lt;a href=&#34;https://study.iitm.ac.in/ds/course_pages/BSSE2002.html&#34;&gt;my course at IITM&lt;/a&gt; and to recruit for &lt;a href=&#34;https://gramener.com/&#34;&gt;Gramener&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;The tests had 2 interesting features.&lt;/p&gt;
&lt;h3 class=&#34;wp-block-heading&#34;&gt;&lt;strong&gt;One question required them to hack the page&lt;/strong&gt;&lt;/h3&gt;
&lt;blockquote class=&#34;wp-block-quote&#34;&gt;
&lt;p&gt;Write the body of the request to an &lt;a href=&#34;https://platform.openai.com/docs/api-reference/chat&#34;&gt;OpenAI chat completion call&lt;/a&gt; that:&lt;/p&gt;
&lt;ul class=&#34;wp-block-list&#34;&gt;
&lt;li&gt;Uses model &lt;code&gt;gpt-4o-mini&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Has a &lt;code&gt;system&lt;/code&gt; message: &lt;code&gt;Respond in JSON&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Has a user message: &lt;code&gt;Generate 10 random addresses in the US&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Uses &lt;a href=&#34;https://platform.openai.com/docs/guides/structured-outputs/&#34;&gt;structured outputs&lt;/a&gt; to respond with an object &lt;code&gt;addresses&lt;/code&gt; which is an array of objects with &lt;strong&gt;required&lt;/strong&gt; fields: &lt;code&gt;street&lt;/code&gt; (string) &lt;code&gt;city&lt;/code&gt; (string) &lt;code&gt;apartment&lt;/code&gt; (string) .&lt;/li&gt;
&lt;li&gt;Sets &lt;code&gt;additionalProperties&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; to prevent additional properties.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What is the JSON body we should send to &lt;code&gt;https://api.openai.com/v1/chat/completions&lt;/code&gt; for this? (No need to run it or to use an API key. Just write the body of the request below.)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;There&#39;s no answer box above. Figure out how to enable it. That&#39;s part of the test.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The only way to even &lt;em&gt;attempt&lt;/em&gt; this question is to inspect the page, find the hidden input and make it visible. (This requires removing a class, an attribute, and a style - from different places.)&lt;/p&gt;
&lt;p&gt;Here&#39;s the number of people who managed to enable the text box and answer it.&lt;/p&gt;
&lt;figure class=&#34;wp-block-table&#34;&gt;&lt;table class=&#34;has-fixed-layout&#34;&gt;&lt;thead&gt;&lt;tr&gt;&lt;th class=&#34;has-text-align-left&#34; data-align=&#34;left&#34;&gt;College&lt;/th&gt;&lt;th class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;# students&lt;/th&gt;&lt;th class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;Enabled&lt;/th&gt;&lt;th class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;Answered&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&#34;has-text-align-left&#34; data-align=&#34;left&#34;&gt;NIT Bhopal&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;144&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;4 (2.8%)&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;0 (0.0%)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&#34;has-text-align-left&#34; data-align=&#34;left&#34;&gt;CBIT&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;277&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;16 (5.8%)&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;0 (0.0%)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&#34;has-text-align-left&#34; data-align=&#34;left&#34;&gt;IIT Madras&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;693&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;74 (10.7%)&lt;/td&gt;&lt;td class=&#34;has-text-align-right&#34; data-align=&#34;right&#34;&gt;4 (0.6%)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/figure&gt;
&lt;p&gt;A few things surprised me.&lt;/p&gt;
&lt;p&gt;First, I think &lt;strong&gt;students don&#39;t inspect HTML&lt;/strong&gt;. Less than 10% of students managed to modify the HTML page, &lt;em&gt;even after being told they need to&lt;/em&gt;. &lt;strong&gt;But they know web programming&lt;/strong&gt;. 49 students at CBIT scored full marks on the rest of the questions, which includes CSS selectors and complex JS code. Maybe editing in a browser instead of an editor is a big mental leap?&lt;/p&gt;
&lt;p&gt;Second, almost &lt;strong&gt;no one could solve this problem&lt;/strong&gt;. There are 3 ways to easily solve it.&lt;/p&gt;
&lt;ol class=&#34;wp-block-list&#34;&gt;
&lt;li&gt;Copy the question and relevant test cases from my exam page&#39;s JavaScript into ChatGPT and ask for an answer. (I test it and it works.)&lt;/li&gt;
&lt;li&gt;Copy the question and &lt;a href=&#34;https://platform.openai.com/docs/guides/structured-outputs&#34;&gt;structured output documentation&lt;/a&gt; to ChatGPT and ask for an answer. (I tested it and it works.)&lt;/li&gt;
&lt;li&gt;Create a random JSON and just keep fixing the errors manually until it passes. (The exam gives detailed error messages like &#34;The system message must be &#39;Respond in JSON&#39;&#34;, &#34;addresses items must be an object&#34;, etc.)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Maybe questions from a curriculum are easier to solve than questions not in a curriculum? Or is JSON schema too hard?&lt;/p&gt;
&lt;h3 class=&#34;wp-block-heading&#34;&gt;The exam was officially hackable&lt;/h3&gt;
&lt;p&gt;All validation was on the client side. The JS code was minified and answers are dynamically generated. But a student can set a breakpoint, see the answers, and modify their responses.&lt;/p&gt;
&lt;p&gt;The students at NIT Bhopal and CBIT were not explicitly told that. The students at IITM were &lt;em&gt;explicitly told&lt;/em&gt; that they could (and are welcome to) hack it.&lt;/p&gt;
&lt;p&gt;Out of the 1,114 students who took these tests, &lt;strong&gt;only one student actually hacked it&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;(How do I know that? No other student got full marks. This student got full marks with empty answers.)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;It&#39;s probably not that difficult&lt;/strong&gt;. My &lt;a href=&#34;https://github.com/sanand0/tools-in-data-science-public/blob/4f42624aadf58aca21b46d3a4b6e856c2ae85adf/2-data-sourcing.md#scraping-the-imdb-with-browser-javascript&#34;&gt;course content&lt;/a&gt; covers scraping pages using JavaScript using DevTools. Inspecting JS is just a step away.&lt;/p&gt;
&lt;p&gt;I did chat with the student who hacked it, asking:&lt;/p&gt;
&lt;blockquote class=&#34;wp-block-quote&#34;&gt;
&lt;p&gt;&lt;strong&gt;Anand&lt;/strong&gt;: How come you didn&#39;t share the details of the hack with others?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Student&lt;/strong&gt;: I did with a few but I am not sure whether or not they were able to figure it out still.&lt;br/&gt;Most students in the program still require a lot of handholding even with basic things.&lt;br/&gt;Experience from being a TA [Teaching Assistant] past term.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 class=&#34;wp-block-heading&#34;&gt;Why didn&#39;t they hack?&lt;/h3&gt;
&lt;p&gt;Maybe...&lt;/p&gt;
&lt;ol class=&#34;wp-block-list&#34;&gt;
&lt;li&gt;&lt;strong&gt;They don&#39;t believe me&lt;/strong&gt;. What if hacking the exam page is considered cheating, even if explicitly allowed?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The time pressure is too much&lt;/strong&gt;. They&#39;d rather solve what they know than risk wasting time hacking.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It feels wrong&lt;/strong&gt;. They&#39;d rather answer based on their knowledge than take a shortcut.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;They don&#39;t know how&lt;/strong&gt;. Using DevTools is more sophisticated than web programming.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Issue #1 - the trust issue - is solveable. We can issue multiple official notices.&lt;/p&gt;
&lt;p&gt;Issue #4 - capability - is not worth solving. My aim is to get students to do stuff they weren&#39;t taught.&lt;/p&gt;
&lt;p&gt;Issue #2 &amp;amp; #3 - &lt;strong&gt;a risk-taking culture&lt;/strong&gt; - is what I want to encourage. It might teach them to blur ethical lines and neglect fundamentals (which are bad), but it might also build adaptability, creativity, and prepare them for real-world scenarios.&lt;/p&gt;
&lt;p&gt;Personally, I need more team members that get the job done even if they&#39;ve never done it before.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Hacking wireless networks</title>
      <link>https://www.s-anand.net/blog/hacking-wireless-networks/</link>
      <pubDate>Tue, 17 Jan 2006 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/hacking-wireless-networks/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.sheerboredom.net/modules.php?name=News&amp;amp;file=article&amp;amp;sid=79&#34;&gt;Hacking wireless networks&lt;/a&gt;. How to get access to secure networks, and how to see what others are doing on their wireless networks.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;comments&#34;&gt;Comments&lt;/h2&gt;
&lt;!-- wp-comments-start --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Arun&lt;/strong&gt; &lt;em&gt;18 Jan 2006 4:56 am&lt;/em&gt;:
Anand, can you recommend a few good podcasts you listen to?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S Anand&lt;/strong&gt; &lt;em&gt;20 Jan 2006 12:01 pm&lt;/em&gt;:
I don&amp;rsquo;t listen to podcasts, I&amp;rsquo;m afraid! Trains are too noisy, don&amp;rsquo;t like using headphones at office, and prefer watching movies at home. So effectively no place for podcasts :-)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Arun&lt;/strong&gt; &lt;em&gt;20 Jan 2006 3:09 pm&lt;/em&gt;:
Oh..ok..Somehow I thought you had made some post about listening to podcasts on trains sometime ago. Guess it must have been some other blog. Or I must have been dreaming :-)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S Anand&lt;/strong&gt; &lt;em&gt;20 Jan 2006 6:32 pm&lt;/em&gt;:
No, you&amp;rsquo;re right. That was in July, when I was commuting OVER the ground, where there&amp;rsquo;s less noise. Now I commute UNDERground, and can&amp;rsquo;t hear anything, so I&amp;rsquo;d given up soon after I started.&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- wp-comments-end --&gt;
</description>
    </item>
    <item>
      <title>Caltech vs MIT</title>
      <link>https://www.s-anand.net/blog/caltech-vs-mit/</link>
      <pubDate>Mon, 11 Apr 2005 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/caltech-vs-mit/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.caltechvsmit.com/&#34;&gt;Caltech vs MIT pranks&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Harvard hackers</title>
      <link>https://www.s-anand.net/blog/harvard-hackers/</link>
      <pubDate>Wed, 09 Mar 2005 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/harvard-hackers/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.computerworld.com/securitytopics/security/hacking/story/0,10801,100261,00.html&#34;&gt;Harvard rejects applicants using hacker services&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Hacking using keyboard whispers</title>
      <link>https://www.s-anand.net/blog/hacking-using-keyboard-whispers/</link>
      <pubDate>Wed, 12 May 2004 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/hacking-using-keyboard-whispers/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s possible to make sense out of &lt;a href=&#34;http://searchsecurity.techtarget.com/originalContent/0,289142,sid14_gci963348,00.html&#34;&gt;keyboard whispers&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Hacking gets more focused</title>
      <link>https://www.s-anand.net/blog/hacking-gets-more-focused/</link>
      <pubDate>Tue, 13 May 2003 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/hacking-gets-more-focused/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://rss.com.com/2010-1071_3-1001016.html&#34;&gt;Hacking gets more focused&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Hacking arrest</title>
      <link>https://www.s-anand.net/blog/hacking-arrest/</link>
      <pubDate>Thu, 25 Apr 2002 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/hacking-arrest/</guid>
      <description>&lt;p&gt;The first case of &lt;a href=&#34;http://economictimes.indiatimes.com/articleshow.asp?art_id=7871588&#34;&gt;hacking&lt;/a&gt; under the IT Act has been registered. Had to be someone out of jurisdiction, didn&amp;rsquo;t it!&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Social engineering</title>
      <link>https://www.s-anand.net/blog/social-engineering/</link>
      <pubDate>Thu, 27 Dec 2001 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/social-engineering/</guid>
      <description>&lt;p&gt;Hacking and &lt;a href=&#34;http://securityfocus.com/infocus/1527&#34;&gt;social engineering&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>XP copyright protection hacked</title>
      <link>https://www.s-anand.net/blog/xp-copyright-protection-hacked/</link>
      <pubDate>Wed, 07 Nov 2001 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/xp-copyright-protection-hacked/</guid>
      <description>&lt;p&gt;In the meantime, Microsoft XP&amp;rsquo;s copyright protection has been &lt;a href=&#34;http://www.newsbytes.com/news/01/171651.html&#34;&gt;hacked&lt;/a&gt;. Their digital rights management scheme: &lt;a href=&#34;http://www.theregister.co.uk/content/4/22354.html&#34;&gt;hacked&lt;/a&gt;. Passport: &lt;a href=&#34;http://www.theregister.co.uk/content/4/22655.html&#34;&gt;hacked&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Underground - book on hacking</title>
      <link>https://www.s-anand.net/blog/underground-book-on-hacking/</link>
      <pubDate>Thu, 05 Apr 2001 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/underground-book-on-hacking/</guid>
      <description>&lt;p&gt;Drefus&amp;rsquo; book on hacking, &lt;a href=&#34;http://www.underground-book.com/&#34;&gt;Underground&lt;/a&gt;, is available online.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Hacking is unavoidable</title>
      <link>https://www.s-anand.net/blog/hacking-is-unavoidable/</link>
      <pubDate>Mon, 02 Apr 2001 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/hacking-is-unavoidable/</guid>
      <description>&lt;p&gt;After seeing &lt;a href=&#34;http://www.zdnet.com/zdnn/stories/news/0,4586,5079958,00.html&#34;&gt;how costly it is to detect hacking&lt;/a&gt;, and the fact that anything you say can be &lt;a href=&#34;http://news.cnet.com/news/0-1005-200-5148422.html&#34;&gt;logged against you&lt;/a&gt;, one wonders if being online is worth it. If you&amp;rsquo;ve got a permanent Internet connection, keep it switched off.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Online payment risks</title>
      <link>https://www.s-anand.net/blog/online-payment-risks/</link>
      <pubDate>Fri, 16 Mar 2001 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/online-payment-risks/</guid>
      <description>&lt;p&gt;Better be a bit careful about online payments. &lt;a href=&#34;http://news.cnet.com/news/0-1007-200-5069377.html&#34;&gt;A Russian hacker&lt;/a&gt; stole from 40 companies. &lt;a href=&#34;http://news.cnet.com/news/0-1007-200-5031805.html&#34;&gt;Amazon&amp;rsquo;s subsidiary&lt;/a&gt; was hit. And &lt;a href=&#34;http://news.cnet.com/news/0-1003-200-5068115.html&#34;&gt;IBM&amp;rsquo;s Net.Commerce is buggy&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Websites that have been defaced</title>
      <link>https://www.s-anand.net/blog/websites-that-have-been-defaced/</link>
      <pubDate>Wed, 17 Jan 2001 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/websites-that-have-been-defaced/</guid>
      <description>&lt;p&gt;Statistics on &lt;a href=&#34;http://www.attrition.org/mirror/attrition/stats.html&#34;&gt;websites that have been defaced&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Online transactions unsafe</title>
      <link>https://www.s-anand.net/blog/online-transactions-unsafe/</link>
      <pubDate>Sat, 23 Dec 2000 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/online-transactions-unsafe/</guid>
      <description>&lt;p&gt;Are credit card transactions on the Net safe? Egghead had their&amp;rsquo;s &lt;a href=&#34;http://dailynews.yahoo.com/h/zd/20001222/tc/egghead_cracked_by_credit-card_hack_1.html&#34;&gt;stolen&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Astalavista</title>
      <link>https://www.s-anand.net/blog/astalavista/</link>
      <pubDate>Mon, 21 Aug 2000 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/astalavista/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.astalavista.com/en/&#34;&gt;AstaLaVista&lt;/a&gt; is an &amp;lsquo;underground search engine&amp;rsquo;. I&amp;rsquo;d been there before, and since its survived this long, it must be good.&lt;/p&gt;
</description>
    </item>
    <item>
      <title>Hacked computer network experience</title>
      <link>https://www.s-anand.net/blog/hacked-computer-network-experience/</link>
      <pubDate>Sat, 15 Jul 2000 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/hacked-computer-network-experience/</guid>
      <description>&lt;p&gt;An interesting story about a &lt;a href=&#34;http://rootprompt.org/article.php3?article=403&#34;&gt;hacked computer network&lt;/a&gt; and how they recovered.&lt;/p&gt;
</description>
    </item>
  </channel>
</rss>
