Skip to content

engine:kernel

load_driver

Type

function

Description

This function will allow you to load a kernel driver as if it belongs to constelia.ai (fantasy.cat). The kernel driver will be wiped from any common logging systems that tends to be monitored. This is better than using the Windows Service Manager to load a driver as it creates better stealth options.

Windows restrictions still apply to this function. If your kernel driver is not signed, the driver will likely not load unless TEST-SIGNING mode is enabled with DSE. See this page for error messages that might appear in console.

This function only works for Windows. If you wish to load a Linux kernel driver, you must do so manually. You are fully responsible for what happens to your system when using this function.

Parameters

  • string service name
  • string path of kernel driver

unload_driver

Type

function

Description

This function will unload a driver and wipe any commonly known traces from your system. This can cause a BSOD if the driver was never intended to be unloaded. You can use this function to stop client anti-cheat services from running. This does not imply that it will bypass the client.

Parameters

  • string service name

get_ntoskrnl

Type

function

Description

This function will get the base address of ntoskrnl.exe (System).

Returns

  • address

load_vulnerable_driver

Type

function

Description

This will load a vulnerable driver to your system memory. Don't forget to use unload_vulnerable_driver or else there is a possibility that your FC2 will not work until restart. You can also invoke a BSOD if this isn't used correctly. Attempting to load the vulnerable driver when it's already loaded will return false. This only returns true if the driver was never loaded and was loaded successfully.

The string parameter will determine what the vulnerable driver will be named in your service manager. This won't change the fact the vulnerable driver will load or not. But it is in best practice to have a unique name for the driver. Name it anything you want. Randomize the name if need be. It doesn't matter.

Parameters

  • string service and file name

Returns

  • boolean

unload_vulnerable_driver

Type

function

Description

If you had called load_vulnerable_driver at one point, this script will unload it from memory.

Returns

  • boolean

read

Type

function

Description

This reads kernel memory. Only use this function and write for kernel memory. Doing so with process memory will result in a BSOD. Use the FC2K driver for that instead.

Parameters

  • address

Returns

  • address

write

Type

function

Parameters

  • address

Returns

  • address

get_phys

Type

function

Description

Converts memory address to physical.

Parameters

  • address

Returns

  • address

map_driver

Type

function

Description

Maps a kernel driver into memory and calls the entry point. This function will allow you to load unsigned drivers without having to enter TESTSIGNING mode or anything of relation. Meaning, if you want to load a kernel driver without a certificate, use this function.

This function must be called after load_vulnerable_driver was successful. Without the vulnerable driver, this function will always return false immediately.

The boolean parameter would usually be true for most drivers designed to be mapped. You should only have this false if your driver is packed or does not contain a custom entry point. This function can crash FC2 if the custom entry point argument isn't properly fulfilled.

Parameters

  • string path of .sys file.
  • boolean contains custom entry point

Returns

  • boolean

disable_mvdb

Type

function

Description

Disables Microsoft Vulnerable Driver Blocklist.


is_fc2k_loaded

Type

function

Returns

  • boolean

is_parallax_loaded

Type

function

Returns

  • boolean

is_drawing

Type

function

Description

Returns true if the member is using FC2K to render visuals instead of an overlay. This will always return true if the user is on Linux or using the overlay module instead of FC2KV.

Returns

  • boolean

line

Type

function

Parameters

  • number x
  • number y
  • number x2
  • number y2
  • number thickness
  • color color

box

Type

function

Parameters

  • number x
  • number y
  • number x2
  • number y2
  • number thickness
  • color color

boxf

Type

function

Description

Keep in mind that opacity is not considered when using FC2KV. Therefore, drawing a filled box will never include any sort of transparency.

Parameters

  • number x
  • number y
  • number x2
  • number y2
  • color color

text

Type

function

Description

This will draw text on your screen using the FC2KV. See the restrictions with this feature here (click me). This function is very limited and shares the same roadblocks as other kernel drawing functions. Use appropriately.

Parameters

  • string text
  • number font_size
  • number x
  • number y
  • color color (optional)

Example

Lua
1
2
3
4
5
6
7
8
9
local kernel = fantasy.engine.kernel()

-- draw text
kernel:text( 
    "Hello World. This is a test!", -- text
    18,                             -- font size
    250,                            -- x
    250                             -- y
)