1
0
Fork 0
forked from mCaptcha/website
mcaptcha-website/blog/may-2022-monthly-report/index.html
2022-06-14 08:35:44 +00:00

116 lines
No EOL
20 KiB
HTML

<!doctype html><html lang=en-us><head><meta charset=utf-8><meta http-equiv=x-ua-compatible content="ie=edge"><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><link rel=preload as=font href=/fonts/vendor/jost/jost-v4-latin-regular.woff2 type=font/woff2 crossorigin><link rel=preload as=font href=/fonts/vendor/jost/jost-v4-latin-700.woff2 type=font/woff2 crossorigin><link rel=stylesheet href=/main.60c01f8e4587d713b944a8a0acde263887dd938acaa06c1d283db35e4ce18008340510c4a66b77a38e97377e97a7a3c8fb6ebfead61e11e97ee3a8a5539f6d10.css integrity="sha512-YMAfjkWH1xO5RKigrN4mOIfdk4rKoGwdKD2zXkzhgAg0BRDEpmt3o46XN36Xp6PI+26/6tYeEel+46ilU59tEA==" crossorigin=anonymous><noscript><style>img.lazyload{display:none}</style></noscript><meta name=robots content="index, follow"><meta name=googlebot content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1"><meta name=bingbot content="index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1"><title>May, 2022: Monthly Report - mCaptcha</title><meta name=description content="Python bindings to mCaptcha PoW, DDoS effectiveness measurement, major refactoring to prepare for support for other databases, We also tried to test its DoS defence effectiveness, and some exciting news regarding managed hosting!"><link rel=canonical href=/blog/may-2022-monthly-report/><meta name=twitter:card content="summary_large_image"><meta name=twitter:image content="/blog/may-2022-monthly-report/icon.png"><meta name=twitter:title content="May, 2022: Monthly Report"><meta name=twitter:description content="Python bindings to mCaptcha PoW, DDoS effectiveness measurement, major refactoring to prepare for support for other databases, We also tried to test its DoS defence effectiveness, and some exciting news regarding managed hosting!"><meta name=twitter:site content="@"><meta name=twitter:creator content="@"><meta property="og:title" content="May, 2022: Monthly Report"><meta property="og:description" content="Python bindings to mCaptcha PoW, DDoS effectiveness measurement, major refactoring to prepare for support for other databases, We also tried to test its DoS defence effectiveness, and some exciting news regarding managed hosting!"><meta property="og:type" content="article"><meta property="og:url" content="/blog/may-2022-monthly-report/"><meta property="og:image" content="/blog/may-2022-monthly-report/icon.png"><meta property="article:published_time" content="2022-06-10T00:00:00+00:00"><meta property="article:modified_time" content="2022-06-14T14:04:20+05:30"><meta property="og:site_name" content="mCaptcha"><meta property="article:publisher" content="https://www.facebook.com/"><meta property="article:author" content="https://www.facebook.com/"><meta property="og:locale" content="en_US"><script type=application/ld+json>{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"\/"},{"@type":"ListItem","position":2,"name":"Blogmay 2022 Monthly Report","item":"\/blogmay-2022-monthly-report\/"}]}</script><meta name=theme-color content="#fff"><link rel=apple-touch-icon sizes=180x180 href=/apple-touch-icon.png><link rel=icon type=image/png sizes=32x32 href=/favicon-32x32.png><link rel=icon type=image/png sizes=16x16 href=/favicon-16x16.png><link rel=manifest href=/site.webmanifest></head><body class="blog single"><div class="header-bar fixed-top"></div><header class="navbar fixed-top navbar-expand-md navbar-light"><div class=container><input class="menu-btn order-0" type=checkbox id=menu-btn>
<label class="menu-icon d-md-none" for=menu-btn><span class=navicon></span></label><a class="navbar-brand order-1 order-md-0 me-auto" href=/>mCaptcha</a>
<button id=mode class="btn btn-link order-2 order-md-4" type=button aria-label="Toggle mode">
<span class=toggle-dark><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"/></svg></span><span class=toggle-light><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-sun"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg></span></button><ul class="navbar-nav social-nav order-3 order-md-5"><li class=nav-item><a class=nav-link href=https://github.com/mCaptcha><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-github"><path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37.0 00-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44.0 0020 4.77 5.07 5.07.0 0019.91 1S18.73.65 16 2.48a13.38 13.38.0 00-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07.0 005 4.77 5.44 5.44.0 003.5 8.55c0 5.42 3.3 6.61 6.44 7A3.37 3.37.0 009 18.13V22"/></svg><span class="ms-2 visually-hidden">GitHub</span></a></li></ul><div class="collapse navbar-collapse order-4 order-md-1"><ul class="navbar-nav main-nav me-auto order-5 order-md-2"><li class=nav-item><a class=nav-link href=/about/>About</a></li><li class="nav-item active"><a class=nav-link href=/blog/>Blog</a></li><li class=nav-item><a class=nav-link href=/community/>Community</a></li><li class=nav-item><a class=nav-link href=/contact/>Contact</a></li><li class=nav-item><a class=nav-link href=/docs/prologue/introduction/>Docs</a></li></ul><div class="break order-6 d-md-none"></div><form class="navbar-form flex-grow-1 order-7 order-md-3"><input id=userinput class="form-control is-search" type=search placeholder="Search docs..." aria-label="Search docs..." autocomplete=off><div id=suggestions class="shadow bg-white rounded"></div></form></div></div></header><div class="wrap container" role=document><div class=content><div class="row flex-xl-nowrap"><nav class="docs-toc d-none d-xl-block col-xl-3" aria-label="Secondary navigation"><div class=page-links><h3>On this page</h3><nav id=TableOfContents><ul><li><a href=#python-bindings-to-mcaptcha-powhttpsgithubcommcaptchapow_sha256>Python bindings to <a href=https://github.com/mCaptcha/pow_sha256/>mCaptcha PoW</a></a></li><li><a href=#measuring-ddos-protection-effectiveness>Measuring DDoS protection effectiveness</a></li><li><a href=#refactor>Refactor</a></li><li><a href=#mcapthca-is-now-on-the-fediverse>mCapthca is now on the Fediverse</a></li><li><a href=#generic-hosting>Generic hosting</a></li></ul></nav></div></nav><main class="docs-content col-lg-11 col-xl-9 mx-xl-auto"><article><div class=blog-header><h1>May, 2022: Monthly Report</h1><p><small>Posted June 10, 2022 by <a class="stretched-link position-relative" href=/contributors/aravinth-manivannan/>Aravinth Manivannan</a>&nbsp;&dash;&nbsp;<strong>4&nbsp;min read</strong></small><p><p><small>Last Edited June 14, 2022</small><p></div><p class=lead>We are mCaptcha. We build kickass CAPTCHA systems that give (DDoS) attackers a run for their money. And we do all of this without tracking your users. Oh and did I mention our UX is great?</p><p>Hello and welcome to the May 2022 edition of the monthly report!</p><p>mCaptcha, for a while was showing all the signs of a dead project:
no commits on the repositories and no monthly updates. But the project
is far from dead!</p><h2 id=python-bindings-to-mcaptcha-powhttpsgithubcommcaptchapow_sha256>Python bindings to <a href=https://github.com/mCaptcha/pow_sha256/>mCaptcha PoW</a></h2><p><a href=https://github.com/mCaptcha/pow_py>pow_py</a> contains bindings to
<a href=https://github.com/mCaptcha/pow_sha256>pow_sha256</a>, the
<a href=https://en.wikipedia.org/wiki/Proof_of_work>proof-of-work</a> library
that mCaptcha uses. For the uninitiated, the bindings allow for python
programs to automatically solve mCaptcha.</p><p>So if you are writing a script to do some chore on your favourite
website that is protected by mCaptcha, you can now solve the mCaptcha
automatically from within the program.</p><p>Here&rsquo;s an example:</p><div class=highlight><pre class=chroma><code class=language-python data-lang=python><span class=kn>import</span> <span class=nn>os</span>
<span class=kn>import</span> <span class=nn>mcaptcha_pow_py</span>
<span class=kn>import</span> <span class=nn>requests</span>
<span class=c1># get the sitekey that is used in the mCaptcha protected form</span>
<span class=n>SITEKEY</span> <span class=o>=</span> <span class=n>os</span><span class=o>.</span><span class=n>getenv</span><span class=p>(</span><span class=s2>&#34;MCAPTCHA_CAPTCHA_SITEKEY&#34;</span><span class=p>)</span>
<span class=c1># the hostname of the mCaptcha instance that the form is using</span>
<span class=n>MCAPTCHA_HOST</span> <span class=o>=</span> <span class=n>os</span><span class=o>.</span><span class=n>getenv</span><span class=p>(</span><span class=s2>&#34;MCAPTCHA_CAPTCHA_HOST&#34;</span><span class=p>)</span>
<span class=n>GET_CONFIG_ROUTE</span> <span class=o>=</span> <span class=n>f</span><span class=s2>&#34;{MCAPTCHA_HOST}/api/v1/pow/config&#34;</span>
<span class=n>VERIFY_POW_ROUTE</span> <span class=o>=</span> <span class=n>f</span><span class=s2>&#34;{MCAPTCHA_HOST}/api/v1/pow/verify&#34;</span>
<span class=k>def</span> <span class=nf>solve_captcha</span><span class=p>():</span>
<span class=c1># get challenge configuration</span>
<span class=n>key</span> <span class=o>=</span> <span class=p>{</span><span class=s2>&#34;key&#34;</span><span class=p>:</span> <span class=n>sitekey</span><span class=p>}</span>
<span class=n>challenge_config</span> <span class=o>=</span> <span class=n>requests</span><span class=o>.</span><span class=n>post</span><span class=p>(</span><span class=n>GET_CONFIG_ROUTE</span><span class=p>,</span> <span class=n>json</span><span class=o>=</span><span class=n>key</span><span class=p>)</span>
<span class=n>challenge_config</span> <span class=o>=</span> <span class=n>challenge_config</span><span class=o>.</span><span class=n>json</span><span class=p>()</span>
<span class=c1># extract configuration data</span>
<span class=n>config</span> <span class=o>=</span> <span class=n>mcaptcha_pow_py</span><span class=o>.</span><span class=n>PoWConfig</span><span class=p>(</span><span class=n>challenge_config</span><span class=p>[</span><span class=s2>&#34;salt&#34;</span><span class=p>])</span>
<span class=n>pow_string</span> <span class=o>=</span> <span class=n>challenge_config</span><span class=p>[</span><span class=s2>&#34;string&#34;</span><span class=p>]</span>
<span class=n>pow_difficulty_factor</span> <span class=o>=</span> <span class=n>challenge_config</span><span class=p>[</span><span class=s2>&#34;difficulty_factor&#34;</span><span class=p>]</span>
<span class=c1># generate work</span>
<span class=n>work</span> <span class=o>=</span> <span class=n>config</span><span class=o>.</span><span class=n>work</span><span class=p>(</span><span class=n>pow_string</span><span class=p>,</span> <span class=n>pow_difficulty_factor</span><span class=p>)</span>
<span class=c1># verify PoW</span>
<span class=n>proof</span> <span class=o>=</span> <span class=p>{</span>
<span class=s2>&#34;key&#34;</span><span class=p>:</span> <span class=n>SITEKEY</span><span class=p>,</span>
<span class=s2>&#34;nonce&#34;</span><span class=p>:</span> <span class=n>work</span><span class=o>.</span><span class=n>nonce</span><span class=p>,</span>
<span class=s2>&#34;result&#34;</span><span class=p>:</span> <span class=n>work</span><span class=o>.</span><span class=n>result</span><span class=p>,</span>
<span class=s2>&#34;string&#34;</span><span class=p>:</span> <span class=n>challenge_config</span><span class=p>[</span><span class=s2>&#34;string&#34;</span><span class=p>],</span>
<span class=p>}</span>
<span class=n>resp</span> <span class=o>=</span> <span class=n>requests</span><span class=o>.</span><span class=n>post</span><span class=p>(</span><span class=n>VERIFY_POW_ROUTE</span><span class=p>,</span> <span class=n>json</span><span class=o>=</span><span class=n>proof</span><span class=p>)</span>
<span class=n>resp</span> <span class=o>=</span> <span class=n>resp</span><span class=o>.</span><span class=n>json</span><span class=p>()</span>
<span class=c1># extract verification token</span>
<span class=n>token</span> <span class=o>=</span> <span class=n>resp</span><span class=p>[</span><span class=s2>&#34;token&#34;</span><span class=p>]</span>
<span class=k>return</span> <span class=n>token</span>
<span class=n>token</span> <span class=o>=</span> <span class=n>solve_captcha</span><span class=p>()</span>
<span class=n>data</span> <span class=o>=</span> <span class=p>{</span>
<span class=s2>&#34;username&#34;</span><span class=p>:</span> <span class=s2>&#34;me&#34;</span><span class=p>,</span>
<span class=s2>&#34;password&#34;</span><span class=p>:</span> <span class=s2>&#34;superlongpassword&#34;</span><span class=p>,</span>
<span class=s2>&#34;confirm_password&#34;</span><span class=p>:</span> <span class=s2>&#34;superlongpassword&#34;</span><span class=p>,</span>
<span class=s2>&#34;mcaptcha__token&#34;</span><span class=p>:</span> <span class=n>token</span><span class=p>,</span>
<span class=p>}</span>
<span class=n>response</span> <span class=o>=</span> <span class=n>requests</span><span class=o>.</span><span class=n>post</span><span class=p>(</span><span class=s2>&#34;/mCaptcha-protected-form&#34;</span><span class=p>,</span> <span class=n>data</span><span class=o>=</span><span class=n>data</span><span class=p>)</span>
</code></pre></div><p>This could be missed for building DDoS bots(more on that
<a href=#measuring-ddos-protection-effectiveness>here</a>) but this could also be
used to make CAPTCHA solving automated within screen readers and other
accessibility devices!</p><h2 id=measuring-ddos-protection-effectiveness>Measuring DDoS protection effectiveness</h2><p>Proof-of-work has historically been a good method to achieve rate
limiting but how much attack can it, specifically mCaptcha&rsquo;s
implementation, withstand when compared to an unprotected endpoint? To
find out, we used the recently created Python bindings to the mCaptcha
PoW library, the excellent load testing tool,
<a href=https://locust.io>locust</a> and wrote
<a href=https://github.com/mCaptcha/dos>mCaptcha/dos</a>!</p><p><a href=https://vitap.ac.in>VIT AP</a> kindly permitted me, @realaravinth, to use their network
security lab for setting up a isolated, contained testing environment to
mount a DDoS attack on a <a href=https://github.com/mCaptcha/dos/tree/master/rust-server/demo-server>test
server</a>
instance.</p><p>The initial topology consisted of one mCaptcha instance, one DDoS demo
server, one locust node running in leader configuration and six locust
nodes running in follower configuration. I was authorised to use the
netsec lab for three days, which unfortunately wasn&rsquo;t enough to go
finish running the experiment. <a href=https://sibichakkaravarthy.github.io/>Dr. Sibi Chakkaravarthy
Sethuraman</a> has kindly offered to
arrange authorisation to use the netsec lab once again in July 2022,
during which I hope to finish running the experiment</p><p>Special thanks to <a href=http://ackr8.com/>ackr-8</a> and
<a href=https://github.com/alan2000alex>alan2000alex</a> for help with setting up
infrastructure of the experiment.</p><h2 id=refactor>Refactor</h2><p>mCaptcha underwent a major refactor during the month of May: We re-wrote
and cleaned up all database-related stuff for higher flexibility
flexibility and generally good architecture. This refactor lays the
foundation for implementing support for alternate database software
programs(we currently support PostgreSQL only).</p><h2 id=mcapthca-is-now-on-the-fediverse>mCapthca is now on the Fediverse</h2><p>We recently joined the Fediverse on a
<a href=https://docs.gotosocial.org/>GoToSocial</a> instance run by
@realaravinth. We&rsquo;ll soon be deleting our Twitter account in favour of
the Fediverse account.</p><p><strong>Fediverse account:</strong>
<a href=https://gts.batsense.net/@mcaptcha>@mCapthca@batsense.net</a></p><h2 id=generic-hosting>Generic hosting</h2><p>I, @realaravinth, have been busy with <a href=https://forgeflux.org>ForgeFlux</a>
and <a href=https://hostea.org>Hostea</a> &mdash; both of which are <a href=https://en.wikipedia.org/wiki/Forge_(software)>software
forge</a> related and so
when usable, will mostly improve the Free Software ecosystem. Hostea is
a project that aims to create a libre software development ecosystem and
provide managed hosting for the same. The project is <a href=https://forum.hostea.org/t/a-guide-to-hostea-governance/57>built by a
horizontal community</a>, which allows for multiple service providers who
adhere to the Hostea policies to operate
under the Hostea umbrella &mdash; essentially allowing for the creation of
smaller, highly localised cooperatives.</p><p>Cooperatives are interesting, and we believe that mCapthca, too, can
benefit from such an architecture as it will prevent any one party from
single-handedly sabotaging the project. The experience gained from
Hostea will be reused in providing managed hosting for mCapthca.</p><p>By the end of this year, mCapthca will reorganise into a horizontal
community and adopt <a href=https://en.wikipedia.org/wiki/Radical_transparency#Radical_corporate_transparency>radical transparency</a> to improve trust and
reliability of the project</p><blockquote><p>P.S: I, realaravinth, would do it sooner but I&rsquo;m a little busy right
now, so if someone is interested to help out do reach out and so that
we could do it sooner!</p></blockquote><p>In context of mCapthca, radical transparency will include all decisions
publicly made, funding and expenses publicly documented, and all
collaborations, too, publicly documented. This of course doesn&rsquo;t imply
that private, personally identifiable information(addresses and phone
numbers, for instance) will be publicly disclosed. Such information will
be redacted and published.</p></article><div class="docs-navigation d-flex justify-content-between"><a class=ms-auto href=/blog/decenber-2021-monthly-report/><div class="card my-1"><div class="card-body py-2">Decenber, 2021: Monthly Report &rarr;</div></div></a></div><p class=edit-page><a href=https://github.com/mCaptcha/website/blob/master/content/blog/05-22-monthly-report/index.md><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-edit-2"><path d="M17 3a2.828 2.828.0 114 4L7.5 20.5 2 22l1.5-5.5L17 3z"/></svg>Edit this page on GitHub</a></p></main></div></div></div><footer class="footer text-muted"><div class=container><div class=row><div class="col-lg-8 order-last order-lg-first"><ul class=list-inline><li class=list-inline-item>Powered by <a href=https://gohugo.io/>Hugo</a>, and <a href=https://getdoks.org/>Doks</a></li></ul></div><div class="col-lg-8 order-first order-lg-last text-lg-end"><ul class=list-inline><li class=list-inline-item><a href=/about/>About</a></li><li class=list-inline-item><a href=/donate>Donate</a></li><li class=list-inline-item><a href=/privacy-policy/>Privacy</a></li><li class=list-inline-item><a href=/security>Security</a></li><li class=list-inline-item><a href=https://stats.uptimerobot.com/GK7VLFJnBl>Status</a></li><li class=list-inline-item><a href=/thanks>Thanks</a></li></ul></div></div></div></footer><script src=/main.min.db67f0caa6a5788b691b9509981d6e5943f4b8d829170a674f468d4b23671ce4017c47a0a22116a8fc2f2de556c8b48f1afecd86707066f2f022c5dd83e8ea3c.js integrity="sha512-22fwyqaleItpG5UJmB1uWUP0uNgpFwpnT0aNSyNnHOQBfEegoiEWqPwvLeVWyLSPGv7NhnBwZvLwIsXdg+jqPA==" crossorigin=anonymous defer></script><script src=/index.min.14d90a1bf5eef7d2b17902afe7b9ef7f8050a0619390568503a8254f864e31029e63bec047cd6efd6d23a2470d3458899332e923065cef88508028b49ab0b873.js integrity="sha512-FNkKG/Xu99KxeQKv57nvf4BQoGGTkFaFA6glT4ZOMQKeY77AR81u/W0jokcNNFiJkzLpIwZc74hQgCi0mrC4cw==" crossorigin=anonymous defer></script></body></html>