Skip to content

Commit 7df80da

Browse files
authored
Update README.md
1 parent e1225ef commit 7df80da

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

README.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
# virusSTOP
22

3-
# Все права защищены. Идея моя,реализация моя. Использовать в проектах можно с моего разрешения и с моим упоминанием в коде и в анонсах программы и других местах, где будет описываться ваша программа.
3+
# All rights are protected. My idea, my realization. You can use in projects with my permission and with my mention in the code and in the announcements of the program and other places where your program will be described.
44

5-
Решил опробовать свою реализацию мандатного доступа в новом ядре, а то коллеги жалаются на тяжкий труд Касперсого, установленный на их системах. Версию ядра взял последнюю, а именно linux-6.15.8
5+
I decided to try my own implementation of the mandate access in the new nucleus, otherwise colleagues are stinging on the hard work of the casoppent, installed on their systems. The nucleus version took the latter, namely Linux-6.15.8
66

7-
Подготоавливаем систему:
8-
Надо выставить всем испольняемым файлам бит разрешения запуска. (Выставялем как системным утилитам, так и своим)
7+
We prepare the system:
8+
It is necessary to set the bits of the launch permit used by all the files used. (I put it both system utilities and my own)
99
```
1010
sudo find /usr/bin -xdev -type f -exec /usr/bin/setfattr -n "user.bitX" -v 1 {} \;
1111
sudo find /sbin -xdev -type f -exec /usr/bin/setfattr -n "user.bitX" -v 1 {} \;
1212
```
13-
Правим код ядра:
14-
15-
prepare_binprm - понимает,что атрибут не вешается на вирутальные ФС и initram.
13+
Prepare_binPrm - understands that the attribute is not hanged on virus and Initram.
1614

1715
vim fs/exec.c
1816
```bash
@@ -76,13 +74,13 @@ read_file:
7674
}
7775
```
7876
79-
Следующий код устанвливаем всем новым файлам автоматом аттрибут запрещающий выполняться:
77+
The next code sets all new files by the ATRIBUT ATRIBUT prohibiting to execute:
8078
8179
```bash
8280
int vfs_create(struct mnt_idmap *idmap, struct inode *dir,
8381
struct dentry *dentry, umode_t mode, bool want_excl)
8482
{
85-
// ... существующий код ...
83+
// ...
8684

8785
if (!error) {
8886
fsnotify_create(dir, dentry);
@@ -98,7 +96,7 @@ int vfs_mknod(struct mnt_idmap *idmap, struct inode *dir,
9896
{
9997
int error;
10098

101-
// ... существующий код ...
99+
// ...
102100

103101
if (!error) {
104102
fsnotify_create(dir, dentry);
@@ -114,7 +112,7 @@ int vfs_symlink(struct mnt_idmap *idmap, struct inode *dir,
114112
{
115113
int error;
116114

117-
// ... существующий код ...
115+
// ...
118116

119117
if (!error) {
120118
fsnotify_create(dir, dentry);
@@ -164,33 +162,34 @@ static void set_bitx_attribute(struct mnt_idmap *idmap, struct dentry *dentry)
164162
}
165163
}
166164
```
167-
Собираем ядро:
165+
Build kernel:
168166
```
169167
make
170168
make modules_install
171169
make install
172170
mkinitcpio -p linux-custom
173171
```
174-
В fstab для ext4 добавляем поддержку аттрибутов 'user_xattr' и перезагружаемся.
172+
173+
In the FSTAB for EXT4, add support for 'user_xattr' on and reboot.
175174
176175
<img src="https://github.com/oditynet/virusSTOP/blob/main/result.png" title="example" width="800" />
177176
178-
Теперь я создаю программу которая имеет максильный приоритет позволит вам из под системы установить все что угодно:
177+
Now I create a program that has a maxilled priority will allow you to install anything from under the system:
179178
180179
181180
```
182-
# Сборка обертки
181+
#Build launch
183182
gcc -o bitx_launcher bitx_launcher.c
184183

185-
# Сборка библиотеки
184+
# Build lib
186185
gcc -shared -fPIC -o libsetbitx.so set_bitx.c -ldl
187186

188-
# Запуск программы
187+
# Run
189188
LD_PRELOAD=/home/odity/kernel/1/libsetbitx.so ./bitx_launch /bin/bash -c "touch test_file"
190189
getfattr -n user.bitX test_file"
191190
192191
```
193-
Протестировал на установке Nvidia драйверов. Поребовалось только дать двум программам права:
192+
He tested the installation of NVIDIA drivers. It was only required to give two programs of law:
194193
1) /home/odity/Downloads/linux-6.15.8/scripts/mod/modpost
195194
2) /home/odity/Downloads/linux-6.15.8/scripts/basic/fixdep
196195

0 commit comments

Comments
 (0)