<div dir="ltr">I suggested on one of those issues to try to auto-blacklist common 404s as that should pose a negligible usability hit. I'd like to start by logging them to collect data, but I'm confused nowadays as to if that should go into pypa/warehouse or pypa/pypi-legacy. How long until warehouse is where most requests go, or do some go there right now, but from which clients...so confuz, plz halp.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 1, 2017 at 6:29 PM, Donald Stufft <span dir="ltr"><<a href="mailto:donald@stufft.io" target="_blank">donald@stufft.io</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div class="h5"><br><div><blockquote type="cite"><div>On Jun 1, 2017, at 6:20 PM, Jannis Gebauer <<a href="mailto:ja.geb@me.com" target="_blank">ja.geb@me.com</a>> wrote:</div><br class="m_-5011516088607491619Apple-interchange-newline"><div><div style="word-wrap:break-word"><div><blockquote type="cite"><div dir="ltr">This makes me remember <a href="https://hackernoon.com/building-a-botnet-on-pypi-be1ad280b8d6" target="_blank">https://hackernoon.<wbr>com/building-a-botnet-on-pypi-<wbr>be1ad280b8d6</a> on a related note.<br></div></blockquote></div><div><div dir="ltr"><br></div></div>Yep, that’s basically the same thing. Instead of using package names of builtins, the attacker is using a combination of popular apt/yum packages with a mix of package names with typos.<div><br></div><div>During development, it’s not uncommon to make mistakes like:</div><div><br></div><div>pip install requirements.txt (forgot the -r)</div><div>pip install requestd (typo)</div><div>pip install tkinter (not registered)</div><div><br></div><div>Or to use the wrong package manager (apt-get install python-dev vs. pip install python-dev). </div><div><br>I wonder if it would make sense to build some kind of blacklist for this. According to the blog post there were close to 10k installs over a period of just three days. I believe Debian is running some kind of popularity contest for their packages which could be used to identify problematic packages. This will be a lot of manual work, but I’d work on a list like this.</div><div><br></div><div><br></div></div></div></blockquote><br></div><div><br></div></div></div><div>Folks have suggested mining the logs from PyPI looking for 404 results on ``/simple/`` to highlight common packages that are being installed which don’t yet exist, then using that data to inform a sort of automatic blacklist for new project names.</div><div><br></div><div>Other folks have suggested that trying to use some sort of algorithm with existing names to figure out common typos is a solution.</div><div><br></div><div>Ultimately the thing that’s missing is someone to spend the time to figure out a good solution and implement it. I will get to it eventually, but if someone feels enthused to make it happen sooner, then their contribution would be appreciated.</div><div><div style="color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><br>—<span class="HOEnZb"><font color="#888888"><br>Donald Stufft<br></font></span></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-variant-east-asian:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><br></div><br class="m_-5011516088607491619Apple-interchange-newline">
</div>
<br></div><br>______________________________<wbr>_________________<br>
Distutils-SIG maillist  -  <a href="mailto:Distutils-SIG@python.org">Distutils-SIG@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/distutils-sig" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/listinfo/distutils-sig</a><br>
<br></blockquote></div><br></div>