{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"coordinates": [
[| <?php | |
| namespace App\EventListener; | |
| use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
| use Symfony\Component\HttpFoundation\Request; | |
| use Symfony\Component\HttpKernel\Event\RequestEvent; | |
| use Symfony\Component\HttpKernel\KernelEvents; | |
| use Symfony\Component\Validator\Validator\ValidatorInterface; | |
| use Symfony\Component\Validator\Constraints; |
| <?php | |
| class ReconnectingPDO | |
| { | |
| protected $dsn, $username, $password, $pdo, $driver_options; | |
| public function __construct($dsn, $username = "", $password = "", $driver_options = array()) | |
| { | |
| $this->dsn = $dsn; | |
| $this->username = $username; | |
| $this->password = $password; |
The challenge was to achieve RCE with this file:
<?php ($_GET['action'] ?? 'read' ) === 'read' ? readfile($_GET['file'] ?? 'index.php') : include_once($_GET['file'] ?? 'index.php');Some additional hardening was applied to the php installation to make sure that previously known solutions wouldn't work (for further information read this writeup from the challenge author).
I didn't solve the challenge during the competition - here is a writeup from someone who did - but since the idea I had differed from the techniques used in the published writeups I read (and I thought it was cool :D), here is my approach.
Yubikey, Smart Cards, OpenSC and GnuPG are pain in the ass to get working. Those snippets here sould help alleviate pain.
To reset and disable not used modes on Yubikey you need the ykman program
You can install it using those commands
| addEventListener('fetch', event => { | |
| event.respondWith(fetchAndApply(event.request)) | |
| }) | |
| async function fetchAndApply(request) { | |
| let response = await fetch(request) | |
| let referer = request.headers.get('Referer') | |
| let contentType = response.headers.get('Content-Type') || '' | |
| if (referer && contentType.startsWith('image/')) { |
| const fetch = require('node-fetch'); | |
| async function run() { | |
| let username = "YOUR USERNAME HERE"; | |
| let password = "YOUR APP PASSWORD"; | |
| let authBasic = new Buffer(username + ':' + password).toString('base64'); | |
| let session = await (await fetch('https://jmap.fastmail.com/.well-known/jmap', { | |
| headers: { | |
| "Authorization": "Basic " + authBasic | |
| } | |
| })).json(); |
| html { | |
| scroll-behavior: smooth; | |
| } | |
| @media (prefers-reduced-motion: reduce) { | |
| html { | |
| scroll-behavior: auto; | |
| } | |
| } |
I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.
I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real
| mode: 'usage' | |
| source: './lib' | |
| filePattern: '*.php' | |
| formatter: 'PhpDA\Writer\Strategy\Svg' | |
| target: './complex-cycle.svg' | |
| groupLength: 3 | |
| visitorOptions: | |
| PhpDA\Parser\Visitor\Required\DeclaredNamespaceCollector: {minDepth: 2, sliceLength: 6, excludePattern: '/^((?!.*(Doctrine\\Migrations))|(?=.*Exception)).*$/'} | |
| PhpDA\Parser\Visitor\Required\MetaNamespaceCollector: {minDepth: 2, sliceLength: 4, excludePattern: '/^((?!.*(Doctrine\\Migrations))|(?=.*Exception)).*$/'} | |
| PhpDA\Parser\Visitor\Required\UsedNamespaceCollector: {minDepth: 2, sliceLength: 4, excludePattern: '/^((?!.*(Doctrine\\Migrations))|(?=.*Exception)).*$/'} |