Writing a plugin to display the number of passwords, cookies in the list of users

Teacher

Professional
Messages
2,669
Reaction score
819
Points
113
A guide to writing a plugin for DCRAT!
The article is of an educational nature, we do not call for anything or oblige. The information is presented for informational purposes only.

Introduction

Plugin essence:
The plugin will receive information about passwords, cookies, forms and send them to the panel, to the list of users. We will also add columns for them with a plugin.

Create a DCLIB project
This part of the plugin will be the build plugin.

Run the program and press the Create button, then you need to come up with a name for the project and select the DCLIB project type, for example:

f658942dd23bd677a5cab.png


Click Create, the project settings will open in front of you, you can leave it as it is or change them for yourself. Next, go to the C # Editor tab:

ecee4efdcbe6e588144eb.png


The code editor will open, each method has a description.

For the plugin to work, you need the OnStealerDone method. To work API reserve method OnAPIDelegatesCreate and delegate setCustomColumnData in class API, only we'll need at the moment.

It turns out something like this:

3ad4f0ec30d4dd52f7fcc.png

Now he will write a code that will assign values to columns in the list of users, everything is very simple.

We have the API.setCustomColumnData method, its parameters are signed:

d2545fa85e218aa649bf9.png


groupName - The name of the column group, usually the name of the plugin is indicated there, this name must be unique for each plugin.

columnName - The name of the column in the table, you can specify any.

data - Data itself, string - string.

The code will look like this:

b15d694c8432267f3b002.png


The WorkResult dictionary stores the result of the stealer's work, some statistics. (The news channel is described in more detail) The list of all values can be displayed in a loop, it is just entered as an example, when creating a project.

Now let's add the rest of the values:

deec7bbbbf22a42437751.png


Nothing complicated. In the same way, you can output the rest of the required values from the WorkResult , if you need them.

Now you can build the plugin, for this click Actions -> Compile / Export:

5bddc6b7fbaf5bdcbd8d5.png


We create a DESIGN project part 1
This part of the plugin will be a plugin for the rata panel, adding your own columns.

We create another project, come up with a name, you need to select the DESIGN project type, for example:

e51bee0d3f73063d5b9bc.png


We need an empty project, without buttons and interface, we will work only with non-visual elements.

Click Create, you will have a completely empty project, without buttons:

84304bddb50d0d008dfca.png


To add your columns to the table, you need the script to run immediately when the plugin is loaded.

To execute the script at startup, there is a wonderful non-visual Method object, create it (by clicking), come up with any name:

5649d1917c6c067075fa3.png


We create DESIGN part 2
MANDATORY put a tick on the Auto Start item in the object settings, this is necessary for the script to be executed just when the rat is started.


To compose the script itself, go to the Events section and add the OnExecute event :

e572148aa735025e3aaa3.png

(The only event for this object)

Then 2 times click on it in the list, the editor will open:

b3a981db54549dbb722bb.png


Click on the + at the very bottom, in the window that opens, we find the AddUserTableColumn function:

13b2141c9ae32e8619253.png


In the window that opens, you need to fill in the parameters of the function, fill in the values in the same way as they wrote in the c # code :

3b67f42fc5ab99a0b23e2.png


Click OK and the function is added:

a907c2c80c975870b2578.png


We do this with the rest of the columns:

436fdb241ff099d7f46be.png


When done, click Save & Close to close the script editor.

The script for adding columns is ready, the logic is ready, you can build a DESIGN project.

Click Actions -> Compile / Export.

Save next to the DCLIB plugin.

Result
The contents of the DCLIB plugin are placed in the plugins folder, and the DESIGN plugin in .json format is placed in the design folder.

Open DCRat, connect to the server, click on + in the table and see our columns, turn on their display:

762c0cee6e65493923fa2.png


In the table:

cfc85da25f8fc6710166e.png


Create a build with plugin and AutoStealer to see the result immediately.

We observe the result:

b207552d5860776989aef.png


That's all! Good luck!
 
Top