<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Reversing.AC - The way to stay under radars</title>
    <description></description>
    <link>https://cpz.github.io//</link>
    <atom:link href="https://cpz.github.io//feed.xml" rel="self" type="application/rss+xml" />
    <pubDate>Sat, 03 Jun 2023 15:54:49 +0000</pubDate>
    <lastBuildDate>Sat, 03 Jun 2023 15:54:49 +0000</lastBuildDate>
    <generator>Jekyll v3.9.3</generator>
    
      <item>
        <title>CSPL.ru Anti-Cheat Analysis</title>
        <description>&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;Today we’ll talk about CSPL.ru Anti-Cheat named as “AAC” which means “Apofig Anti-Cheat”. Apofig is previous name of this Russian League.&lt;/p&gt;

&lt;p&gt;AAC is mostly user-mode anti-cheat but they have kernel mode module too.
Previously, when AAC was only user-mode Anti-Cheat in 2012 or around this, they managed to detect Organner via going through all files of player system and looking for ‘config.cfg’ and launcher of Organner. Similar to what Valve did to detect Organner. They was looking for USN Journal and searching for config.cfg and was reading first 2 lines which contained something like ‘Organner.pl Immunity Duo Config File’ and locating of config file to find launcher of organner near of config.&lt;/p&gt;

&lt;p&gt;What they do?:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Collect running processes&lt;/li&gt;
  &lt;li&gt;Collect running modules in processes&lt;/li&gt;
  &lt;li&gt;Collet names of windows&lt;/li&gt;
  &lt;li&gt;Enumerating of running drivers&lt;/li&gt;
  &lt;li&gt;Walking through prefetch and USN Journal&lt;/li&gt;
  &lt;li&gt;Walking through system and hashing files&lt;/li&gt;
  &lt;li&gt;Screenshots via GDI for Desktop screenshots and DirectX for In-Game screenshots.&lt;/li&gt;
  &lt;li&gt;Protect process via Kernel Callbacks&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The four main entities of Anti-Cheat are:&lt;/p&gt;

&lt;p&gt;1: AAC.exe is launcher which connects with CSPL.ru &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;aac.cspl.ru:8008/login&lt;/code&gt; (for some reason, they creating log about connection with site. Can be found there C:\senderr.txt)&lt;/p&gt;

&lt;p&gt;Example of log:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;17/1/2020 17:20:2 Starting AAC
17/1/2020 17:20:4 Send ok! CSPLOK. ID = 1
17/1/2020 17:20:18 Send ok! CSPLOK. ID = 1
17/1/2020 17:20:29 Send ok! CSPLOK. ID = 1
17/1/2020 17:20:44 Send ok! CSPLOK. ID = 1
17/1/2020 17:20:55 Send ok! CSPLOK. ID = 1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;AAC.exe does loading driver &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;usbhubmswg.sys&lt;/code&gt; which installs Callbacks.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;usbhubmswg.sys&lt;/code&gt; using certificate with name ‘Kazakevich Aleh’ and if you’ll google this name then you’ll &lt;a href=&quot;http://www.cyberforum.ru/beta-testing/thread1207634.html&quot;&gt;end up there [0]&lt;/a&gt;. This is how they hashing files of system.&lt;/p&gt;

&lt;p&gt;AAC.exe does injection of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;aacdx.dll&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;d3dx10_43.dll&lt;/code&gt; in to game.&lt;/p&gt;

&lt;p&gt;AAC.exe collecting running processes in system, there a example structure of single process:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;struct {
  std::string windows_caption;
  std::string command_line;
  std::string local_path;
  DWORD hash;
  std::uint8_t file_size;
  std::string caption;
  dlls_stuct dlls;
  DWORD hash2;
} process_struct;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;AAC.exe collecting running dlls in the process, there a example structure:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;struct {
  std::string local_path;
  DWORD hash;
  std::string caption;
} dlls_struct;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;2: usbhubmswg.sys installing CreateProcess, LoadImage, CreateThread, ObProccess(PreCall), ObProcess(PostCall), ObThread(PreCall), ObThread(PostCall) to protect game from injection and etc.&lt;/p&gt;

&lt;p&gt;Driver is protected via VMProtect.&lt;/p&gt;

&lt;p&gt;Non-finished yet.&lt;/p&gt;

&lt;p&gt;3: aacdx.dll does VEH Hook on something?&lt;/p&gt;

&lt;p&gt;Non-finished yet.&lt;/p&gt;

&lt;p&gt;4: Screenshot Cleaner - Proof of Concept&lt;/p&gt;

&lt;p&gt;Non-finished yet.&lt;/p&gt;

&lt;p&gt;5: HWID Information.&lt;/p&gt;

&lt;p&gt;There a structure which contains current user HWID Data (Notice: Its not complete reversed yet.)&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;struct {
  std::string UserName;
  std::uint8_t WinVer;
  std::uint8_t OSbit;
  std::uint8_t WinVer;
  std::string VideoCard;
  std::string DiskVolInfo; /// Disk Volume Info
  std::uint8_t HDD_Type;
  std::string HDD_Name;
  std::uint8_t HDD_RevNo; /// Revision Number
  std::uint8_t HDD_SN;   /// Serial Number
} HWID_Data;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;credits&quot;&gt;Credits&lt;/h2&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;# https://github.com/fwx
# https://github.com/getjump
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Sat, 18 Jan 2020 04:59:00 +0000</pubDate>
        <link>https://cpz.github.io//blog/CSPL-Anti-Cheat-Analysis/</link>
        <guid isPermaLink="true">https://cpz.github.io//blog/CSPL-Anti-Cheat-Analysis/</guid>
        
        <category>reversing</category>
        
        <category>windows</category>
        
        <category>CSPL</category>
        
        <category>anticheat</category>
        
        
        <category>blog</category>
        
      </item>
    
      <item>
        <title>Lost Ark Unexpected Data Mining</title>
        <description>&lt;p&gt;&lt;img src=&quot;https://cpz.github.io/images/screenshots/screenshot_0.png&quot; alt=&quot;Screenshot&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Yay its my first post and this is my first time reversing or hacking in Unreal Engine.&lt;/p&gt;

&lt;p&gt;Today, I’ll talk little bit about how game reversing lead me to &lt;a href=&quot;https://lostarkdatabase.com/kr-lost-ark-season-2-updates-expedition-territory-island-housing-system-genderlock-removal-new-classes/&quot;&gt;new upcoming recently announced classes [0]&lt;/a&gt;. (Notice: They only just announced them, so there is no actual information about them).&lt;/p&gt;

&lt;p&gt;Right now I’m working on a bot for Lost Ark. The main reason is to get an advantage in PvP and not waste any time on routine jobs like getting resources for healing potions.&lt;/p&gt;

&lt;p&gt;The bot should go through the level and collect all the possible obtainable resources. (We define it via a menu, which resources are needed)&lt;/p&gt;

&lt;p&gt;But I’ve run into a problem. I can’t get the names of the entities on the level.&lt;/p&gt;

&lt;p&gt;They have names defined by the engine, like: “EFSkeletalMeshActor” + ID of the entity of the class on the current level. So, the final result is; for example are “EFSkeletalMeshActor_1” but it could be Mining/Lumbering/Herbalism resources.&lt;/p&gt;

&lt;p&gt;We can’t handle gathering resources with the bot because it can’t distinguish the real names of resources.&lt;/p&gt;

&lt;p&gt;This is how they look in game:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://cpz.github.io/images/screenshots/Screenshot_4.jpg&quot; alt=&quot;Screenshot&quot; /&gt;&lt;/p&gt;

&lt;p&gt;So, I’ve started to reverse it and trying to find their category or something that can help me.&lt;/p&gt;

&lt;p&gt;I’ve found some interesting things for the upcoming update.&lt;/p&gt;

&lt;p&gt;There is data in the game which is responsible for players &lt;a href=&quot;https://cpz.github.io/images/screenshots/Screenshot_1.jpg&quot;&gt;class division [1]&lt;/a&gt; and their sub-classes.&lt;/p&gt;

&lt;p&gt;(This enum is deprecated for some reason, &lt;a href=&quot;https://cpz.github.io/images/screenshots/Screenshot_2.jpg&quot;&gt;real enum [2]&lt;/a&gt; is much bigger and contains pre-defined types for future new sub-classes like: PLAYER_CLASS_SPECIALIST600 = 600)&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;// Enum EFGame.EFConst.PlayerClassDeprecated
enum class EPlayerClassDeprecated : uint8_t
{
	PLAYER_CLASS_DEPRECATED_NA     = 0,
	PLAYER_CLASS_DEPRECATED_WARRIOR = 1,
	PLAYER_CLASS_DEPRECATED_MAGICIAN = 2,
	PLAYER_CLASS_DEPRECATED_FIGHTER = 3,
	PLAYER_CLASS_DEPRECATED_DELAIN = 4,
	PLAYER_CLASS_DEPRECATED_HUNTER = 5,
	PLAYER_CLASS_DEPRECATED_SPECIALIST = 6,
	PLAYER_CLASS_DEPRECATED_BERSERKER = 7,
	PLAYER_CLASS_DEPRECATED_DESTROYER = 8,
	PLAYER_CLASS_DEPRECATED_WARLORD = 9,
	PLAYER_CLASS_DEPRECATED_ARCANA = 10,
	PLAYER_CLASS_DEPRECATED_SUMMONER = 11,
	PLAYER_CLASS_DEPRECATED_BARD   = 12,
	PLAYER_CLASS_DEPRECATED_BATTLE_MASTER = 13,
	PLAYER_CLASS_DEPRECATED_INFIGHTER = 14,
	PLAYER_CLASS_DEPRECATED_FORCE_MASTER = 15,
	PLAYER_CLASS_DEPRECATED_BLADE  = 16,
	PLAYER_CLASS_DEPRECATED_DEMONIC = 17,
	PLAYER_CLASS_DEPRECATED_REAPER = 18,
	PLAYER_CLASS_DEPRECATED_HAWK_EYE = 19,
	PLAYER_CLASS_DEPRECATED_DEVIL_HUNTER = 20,
	PLAYER_CLASS_DEPRECATED_BLASTER = 21,
	PLAYER_CLASS_DEPRECATED_ASTROLOGER = 22,
	PLAYER_CLASS_DEPRECATED_MUSICIAN = 23,
	PLAYER_CLASS_DEPRECATED_ALCHEMIST = 24,
	PLAYER_CLASS_DEPRECATED_SCOUTER = 25,
	PLAYER_CLASS_DEPRECATED_LANCE_MASTER = 26,
	PLAYER_CLASS_DEPRECATED_HOLYKNIGHT = 27,
	PLAYER_CLASS_DEPRECATED_MAX    = 28
};
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you’ve played the game at least once then you know that this enum contains more than we get in-game.&lt;/p&gt;

&lt;p&gt;So, what does it actually show us?&lt;/p&gt;

&lt;p&gt;That there are un-released classes like Specialist which contain these sub-classes:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;PLAYER_CLASS_SPECIALIST        = 601,
PLAYER_CLASS_ASTROLOGER        = 602,
PLAYER_CLASS_MUSICIAN          = 603,
PLAYER_CLASS_ALCHEMIST         = 604,
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Also, I’m reversing the CIS region’s version of the game (Its approx. 1 year behind the Korean region’s game version), so it doesn’t have new warrior sub-class Holy-Knight or new class called Assassin but the engine contains data for them because they are surely going to be added in the future.&lt;/p&gt;

&lt;p&gt;So, what else we can see?&lt;/p&gt;

&lt;p&gt;The Hunter class is going to get a new sub-class named ‘Scouter’.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;PLAYER_CLASS_HUNTER            = 501,
PLAYER_CLASS_HAWK_EYE          = 502,
PLAYER_CLASS_DEVIL_HUNTER      = 503,
PLAYER_CLASS_BLASTER           = 504,
PLAYER_CLASS_SCOUTER           = 505,
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The Assassin class is named “Delain” in the engine and also contains an un-released sub-class named ‘Reaper’.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;PLAYER_CLASS_DELAIN            = 401,
PLAYER_CLASS_BLADE             = 402,
PLAYER_CLASS_DEMONIC           = 403,
PLAYER_CLASS_REAPER            = 404,
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href=&quot;https://www.unknowncheats.me/forum/other-mmorpg-and-strategy/308687-lost-ark-sdk-information.html&quot;&gt;Original post [3]&lt;/a&gt; was by me on UC but I decided to post it here too, also describing how I found these things.&lt;/p&gt;

&lt;p&gt;I know its nothing “big” but it was interesting to find something like this.&lt;/p&gt;

&lt;p&gt;If you want to learn more about the game engine for finding anything else interesting then here is a &lt;a href=&quot;https://github.com/cpz/Lost-Ark-SDK&quot;&gt;link [4]&lt;/a&gt; to a dump of the Game Engine.&lt;/p&gt;

&lt;p&gt;Well, I don’t know how to end this post but here is my method for obtaining the un-released data from the game engine.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

&lt;h2 id=&quot;credits&quot;&gt;Credits&lt;/h2&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;# https://github.com/realrespecter (Korea SDK Dump)
# KN4CK3R (UnrealEngine SDK Dumper)
# TheFeckless (Tutorial on reversing Unreal Engine)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Fri, 17 Jan 2020 09:20:00 +0000</pubDate>
        <link>https://cpz.github.io//blog/Lost-Ark-Unexpected-Data-Mining/</link>
        <guid isPermaLink="true">https://cpz.github.io//blog/Lost-Ark-Unexpected-Data-Mining/</guid>
        
        <category>reversing</category>
        
        <category>windows</category>
        
        <category>lostark</category>
        
        
        <category>blog</category>
        
      </item>
    
  </channel>
</rss>
