Hotline: 094.320.0088

Cách tìm các Camera dễ bị xâm nhập bằng Shodan

Cách tìm các Camera dễ bị xâm nhập bằng Shodan

Các công cụ tìm kiếm lập chỉ mục các trang web để bạn có thể tìm thấy chúng hiệu quả hơn và điều này cũng đúng với các thiết bị có kết nối internet. Shodan lập chỉ mục các thiết bị như camera, webcam, máy in và thậm chí cả thiết bị điều khiển công nghiệp vào một cơ sở dữ liệu dễ tìm kiếm, cho phép tin tặc truy cập vào các thiết bị dễ bị tấn công trực tuyến trên toàn cầu. Và bạn có thể tìm thấy cơ sở dữ liệu này thông qua trang web hoặc thư viện dòng lệnh.

Cách tìm các Camera dễ bị xâm nhập bằng Shodan

Shodan đã thay đổi cách thức xây dựng công cụ của tin tặc, vì nó cho phép một phần lớn giai đoạn phát hiện mục tiêu được tự động hóa. Thay vì cần phải quét toàn bộ internet, tin tặc có thể nhập các cụm từ tìm kiếm phù hợp để có được một danh sách lớn các mục tiêu tiềm năng. Thư viện Python của Shodan cho phép tin tặc nhanh chóng viết các tập lệnh Python để tìm các mục tiêu tiềm năng.

Bạn có thể tưởng tượng việc tìm kiếm các thiết bị dễ bị tấn công tương tự như việc cố gắng tìm tất cả các trang trên internet về một chủ đề cụ thể. Thay vì tự mình tìm kiếm mọi trang có sẵn trên web, bạn có thể nhập một nội dung cụ thể vào công cụ tìm kiếm để nhận được kết quả phù hợp nhất.

Cách tìm các Camera bị lỗ hổng bằng Shodan

Bước 1: Đăng nhập vào Shodan

Đầu tiên, dù sử dụng web hay dòng lệnh, bạn cần đăng nhập vào shodan.com trên trình duyệt web. Mặc dù bạn có thể sử dụng Shodan mà không cần đăng nhập, nhưng Shodan hạn chế một số tính năng đối với chỉ những người dùng không đăng nhập. Ví dụ: bạn chỉ có thể xem một trang kết quả tìm kiếm mà không cần đăng nhập. Và bạn chỉ có thể xem hai trang kết quả tìm kiếm khi đăng nhập vào tài khoản miễn phí. Đối với dòng lệnh, bạn sẽ cần Key API của mình để thực hiện một số yêu cầu.

Cách tìm các Camera dễ bị xâm nhập bằng Shodan 22

Bước 2: Thiết lập Shodan qua Command Line (Tùy chọn)

Một tính năng đặc biệt hữu ích của Shodan là bạn không cần phải mở trình duyệt web để sử dụng nó nếu bạn biết Key API của mình. Để cài đặt Shodan, bạn cần có Python trước. Sau đó, bạn có thể nhập lệnh sau vào cửa sổ cmd để cài đặt thư viện Shodan.

~$ pip install shodan

Collecting shodan

  Downloading https://files.pythonhosted.org/packages/22/93/22500512fd9d1799361505a1537a659dbcdd5002192980ad492dc5262717/shodan-1.14.0.tar.gz (46kB)

    100% |████████████████████████████████| 51kB 987kB/s

Requirement already satisfied: XlsxWriter in /usr/lib/python2.7/dist-packages (from shodan) (1.1.2)

Requirement already satisfied: click in /usr/lib/python2.7/dist-packages (from shodan) (7.0)

Collecting click-plugins (from shodan)

  Downloading https://files.pythonhosted.org/packages/e9/da/824b92d9942f4e472702488857914bdd50f73021efea15b4cad9aca8ecef/click_plugins-1.1.1-py2.py3-none-any.whl

Requirement already satisfied: colorama in /usr/lib/python2.7/dist-packages (from shodan) (0.3.7)

Requirement already satisfied: requests>=2.2.1 in /usr/lib/python2.7/dist-packages (from shodan) (2.21.0)

Building wheels for collected packages: shodan

  Running setup.py bdist_wheel for shodan … done

  Stored in directory: /root/.cache/pip/wheels/fb/99/c7/f763e695efe05966126e1a114ef7241dc636dca3662ee29883

Successfully built shodan

Installing collected packages: click-plugins, shodan

Successfully installed click-plugins-1.1.1 shodan-1.14.0

Sau đó, bạn có thể xem tất cả các tùy chọn có sẵn bằng lệnh -h để hiển thị menu trợ giúp.

~$ shodan -h

Usage: shodan [OPTIONS] COMMAND [ARGS]…

Options:

  -h, –help  Show this message and exit.

Commands:

  alert       Manage the network alerts for your account

  convert     Convert the given input data file into a different format.

  count       Returns the number of results for a search

  data        Bulk data access to Shodan

  domain      View all available information for a domain

  download    Download search results and save them in a compressed JSON…

  honeyscore  Check whether the IP is a honeypot or not.

  host        View all available information for an IP address

  info        Shows general information about your account

  init        Initialize the Shodan command-line

  myip        Print your external IP address

  org         Manage your organization’s access to Shodan

  parse       Extract information out of compressed JSON files.

  radar       Real-Time Map of some results as Shodan finds them.

  scan        Scan an IP/ netblock using Shodan.

  search      Search the Shodan database

  stats       Provide summary information about a search query

  stream      Stream data in real-time.

  version     Print version of this tool.

Các tuỳ chọn này khá đơn giản, nhưng không phải tất cả chúng đều hoạt động nếu không kết nối nó với Key API Shodan của bạn. Trong trình duyệt web, đăng nhập vào tài khoản Shodan của bạn, sau đó chuyển đến “My Account”, nơi bạn sẽ thấy Key API duy nhất của mình. Sao chép nó, sau đó sử dụng lệnh init để kết nối Key.

~$ shodan init XXXXxxxxXXXXxxXxXXXxXxxXxxxXXXxX

Successfully initialized

Bước 3: Tìm các Camera có thể truy cập

Có nhiều cách để tìm camera trên Shodan. Thông thường, bạn có thể sử dụng tên của nhà sản xuất camera hoặc máy chủ camera. Shodan lập chỉ mục thông tin trong biểu ngữ (banner), không phải nội dung, có nghĩa là nếu nhà sản xuất đặt tên của họ trong biểu ngữ, bạn có thể tìm kiếm nó. Nếu không, thì tìm kiếm sẽ không có kết quả.

Một trong những mục yêu thích của mình là webcamxp, một phần mềm webcam và camera mạng được thiết kế cho các hệ thống Windows cũ hơn. Sau khi nhập nội dung này vào công cụ tìm kiếm Shodan, nó sẽ đưa ra các liên kết tới hàng trăm, nếu không phải hàng nghìn, camera an ninh hỗ trợ web trên khắp thế giới.

find vulnerable webcams across globe using shodan.w1456 1

Để thực hiện việc này từ dòng lệnh, hãy sử dụng tùy chọn search. (Kết quả bên dưới đã bị cắt bớt.)

~$ shodan search webcamxp

81.133.███.███  8080    ████81-133-███-███.in-addr.btopenworld.com

HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html; charset=utf-8\r\nConten t-Length: 7313\r\nCache-control: no-cache, must revalidate\r\nDate: Tue, 06 Aug 2019 21:39:29 GMT\r\nExpires: Tue, 06 Aug 2019 21:39:29 GMT\r\nPragma: no-cache\r\nServer: webcamXP 5\r\n\r\n

74.218.███.██   8080    ████-74-218-███-██.se.biz.rr.com

HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 7413\r\nCache-control: no-cache, must revalidate\r\nDate: Wed, 07 Aug 2019 14:22:02 GMT\r\nExpires: Wed, 07 Aug 2019 14:22:02 GMT\r\nPragma: no-cache\r\nServer: webcamXP 5\r\n\r\n

208.83.██.205   9206    ████████████.joann.com    HTTP/1.1 704 t\r\nServer: webcam

XP\r\n\r\n

115.135.██.185  8086

HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 2192\r\nCache-control: no-cache, must revalidate\r\nDate: Wed, 07 Aug 2019 06:49:20 GMT\r\nExpires: Wed, 07 Aug 2019 06:49:20 GMT\r\nPragma: no-cache\r\nServer: webcamXP 5\r\n\r\n

137.118.███.107 8080    137-118-███-███.wilkes.net

HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 2073\r\nCache-control: no-cache, must revalidate\r\nDate: Wed, 07 Aug 2019 12:37:54 GMT\r\nExpires: Wed, 07 Aug 2019 12:37:54 GMT\r\nPragma: no-cache\r\nServer: webcamXP 5\r\n\r\n

218.161.██.██   8080    218-161-██-██.HINET-IP.hinet.net

HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 7431\r\nCache-control: no-cache, must revalidate\r\nDate: Mon, 05 Aug 2019 18:39:52 GMT\r\nExpires: Mon, 05 Aug 2019 18:39:52 GMT\r\nPragma: no-cache\r\nServer: webcamXP 5\r\n\r\n

92.78.██.███    37215   ███-092-078-███-███.███.███.pools.vodafone-ip.de

HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 8163\r\nCache-control: no-cache, must revalidate\r\nDate: Wed, 07 Aug 2019 05:17:22 GMT\r\nExpires: Wed, 07 Aug 2019 05:17:22 GMT\r\nPragma: no-cache\r\nServer: webcamXP 5\r\n\r\n

85.157.██.███   8080    ████████.netikka.fi

HTTP/1.1 200 OK\r\nConnection: close\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: 7947\r\nCache-control: no-cache, must revalidate\r\nDate: Wed, 07 Aug 2019 00:25:41 GMT\r\nExpires: Wed, 07 Aug 2019 00:25:41 GMT\r\nPragma: no-cache\r\nServer: webcamXP 5\r\n\r\n

108.48.███.███  8080    ████-108-48-███-███.washdc.fios.verizon.net

HTTP/1.1 401 Unauthorized\r\nConnection: close\r\nContent-Length: 339\r\nCache-control: no-cache, must revalidate\r\nDate: Tue, 06 Aug 2019 22:40:21 GMT\r\nExpires: Tue, 06 Aug 2019 22:17:21 GMT\r\nPragma: no-cache\r\nServer: webcamXP\r\nWWW-Authenticate: Basic realm=”webcamXP”\r\nContent-Type: text/html\r\n\r\n

(END)

Để thoát kết quả, nhấn Q trên bàn phím của bạn. Nếu bạn chỉ muốn xem một số trường nhất định thay vì tất cả mọi thứ, thì có nhiều cách để bỏ qua một số thông tin không cần thiết. Đầu tiên, hãy xem cách sử dụng nó như thế nào bằng cách xem trang trợ giúp.

~$ shodan search -h

Usage: shodan search [OPTIONS] <search query>

  Search the Shodan database

Options:

  –color / –no-color

  –fields TEXT         List of properties to show in the search results.

  –limit INTEGER       The number of search results that should be returned.

                        Maximum: 1000

  –separator TEXT      The separator between the properties of the search

                        results.

  -h, –help            Show this message and exit.

Thật không may, trang trợ giúp không liệt kê tất cả các trường có sẵn mà bạn có thể tìm kiếm, nhưng trang web của Shodan có một danh sách rất hữu ích.

Properties:

asn                         [String] The autonomous system number (ex. “AS4837”).

data                        [String] Contains the banner information for the service.

ip                          [Integer] The IP address of the host as an integer.

ip_str                      [String] The IP address of the host as a string.

ipv6                        [String] The IPv6 address of the host as a string. If this is present then the “ip” and “ip_str” fields wont be.

port                        [Integer] The port number that the service is operating on.

timestamp                   [String] The timestamp for when the banner was fetched from the device in the UTC timezone. Example: “2014-01-15T05:49:56.283713”

hostnames                   [String[]] An array of strings containing all of the hostnames that have been assigned to the IP address for this device.

domains                     [String[]] An array of strings containing the top-level domains for the hostnames of the device. This is a utility property in case you want to filter by TLD instead of subdomain. It is smart enough to handle global TLDs with several dots in the domain (ex. “co.uk”)

location                    [Object] An object containing all of the location information for the device.

location.area_code          [Integer]The area code for the device’s location. Only available for the US.

location.city               [String] The name of the city where the device is located.

location.country_code       [String] The 2-letter country code for the device location.

location.country_code3      [String] The 3-letter country code for the device location.

location.country_name       [String] The name of the country where the device is located.

location.dma_code           [Integer] The designated market area code for the area where the device is located. Only available for the US.

location.latitude           [Double] The latitude for the geolocation of the device.

location.longitude          [Double] The longitude for the geolocation of the device.

location.postal_code        [String] The postal code for the device’s location.

location.region_code        [String] The name of the region where the device is located.

opts                        [Object] Contains experimental and supplemental data for the service. This can include the SSL certificate, robots.txt and other raw information that hasn’t yet been formalized into the Banner Specification.

org                         [String] The name of the organization that is assigned the IP space for this device.

isp                         [String] The ISP that is providing the organization with the IP space for this device. Consider this the “parent” of the organization in terms of IP ownership.

os                          [String] The operating system that powers the device.

transport                   [String] Either “udp” or “tcp” to indicate which IP transport protocol was used to fetch the information

Optional Properties:

uptime                      [Integer] The number of minutes that the device has been online.

link                        [String] The network link type. Possible values are: “Ethernet or modem”, “generic tunnel or VPN”, “DSL”, “IPIP or SIT”, “SLIP”, “IPSec or GRE”, “VLAN”, “jumbo Ethernet”, “Google”, “GIF”, “PPTP”, “loopback”, “AX.25 radio modem”.

title                       [String] The title of the website as extracted from the HTML source.

html                        [String] The raw HTML source for the website.

product                     [String] The name of the product that generated the banner.

version                     [String] The version of the product that generated the banner.

devicetype                  [String] The type of device (webcam, router, etc.).

info                        [String] Miscellaneous information that was extracted about the product.

cpe                         [String] The relevant Common Platform Enumeration for the product or known vulnerabilities if available. For more information on CPE and the official dictionary of values visit the CPE Dictionary.

SSL Properties:

If the service uses SSL, such as HTTPS, then the banner will also contain a property called “ssl”:

ssl.cert                    [Object] The parsed certificate properties that includes information such as when it was issued, the SSL extensions, the issuer, subject etc.

ssl.cipher                  [Object] Preferred cipher for the SSL connection

ssl.chain                   [Array] An array of certificates, where each string is a PEM-encoded SSL certificate. This includes the user SSL certificate up to its root certificate.

ssl.dhparams                [Object] The Diffie-Hellman parameters if available: “prime”, “public_key”, “bits”, “generator” and an optional “fingerprint” if we know which program generated these parameters.

ssl.versions                [Array] A list of SSL versions that are supported by the server. If a version isnt supported the value is prefixed with a “-“. Example: [“TLSv1”, “-SSLv2”] means that the server supports TLSv1 but doesnt support SSLv2.

Vì vậy, nếu chúng ta chỉ muốn xem địa chỉ IP, số cổng, tên tổ chức và tên máy chủ cho địa chỉ IP, chúng ta có thể sử dụng – các trường như sau:

~$ shodan search –fields ip_str,port,org,hostnames webcamxp

81.133.███.███  8080    BT                      ████81-133-███-███.in-addr.btopenworld.com

74.218.███.██   8080    Spectrum Business       ████-74-218-███-██.se.biz.rr.com

208.83.██.███   9206    Jo-ann Stores, LLC      ████████████.joann.com

115.135.██.███  8086    TM Net

137.118.███.███ 8080    Wilkes Communications   137-118-███-███.wilkes.net

218.161.██.██   8080    HiNet                   218-161-██-██.HINET-IP.hinet.net

92.78.██.███    37215   Vodafone DSL            ███-092-078-███-███.███.███.pools.vodafone-ip.de

85.157.██.███   8080    Elisa Oyj               ████████.netikka.fi

108.48.███.███  8080    Verizon Fios            ████-108-48-███-███.washdc.fios.verizon.net

(END)

Xem qua kết quả và tìm camera bạn muốn dùng thử. Nhập tên miền của họ vào trình duyệt và xem bạn có quyền truy cập tức thì hay không. Đây là một loạt các camera mở từ các khách sạn khác nhau ở Palafrugell, Tây Ban Nha mà mình có thể truy cập mà không cần bất kỳ thông tin đăng nhập nào:

Mặc dù có thể rất vui và thú vị khi xem những gì đang diễn ra trước những camera an ninh không được bảo vệ này mà mọi người trên thế giới không hề biết, nhưng có lẽ bạn muốn tìm kiếm các camera cụ thể hơn.

Thử Username và Passwords mặc định

Mặc dù một số camera  mà Shodan tìm ra thường không được bảo vệ, nhưng nhiều camera sẽ yêu cầu xác thực. Để cố gắng có được quyền truy cập mà không cần quá nhiều công sức, hãy thử tên người dùng và mật khẩu mặc định cho các hãng camera. Mìnhđã biên soạn một danh sách ngắn tên người dùng và mật khẩu mặc định của một số webcam được sử dụng rộng rãi nhất bên dưới.

ACTi: admin/123456 or Admin/123456

Axis (traditional): root/pass,

Axis (new): requires password creation during first login

Cisco: No default password, requires creation during first login

Grandstream: admin/admin

IQinVision: root/system

Mobotix: admin/meinsm

Panasonic: admin/12345

Samsung Electronics: root/root or admin/4321

Samsung Techwin (old): admin/1111111

Samsung Techwin (new): admin/4321

Sony: admin/admin

TRENDnet: admin/admin

Toshiba: root/ikwd

Vivotek: root/<blank>

WebcamXP: admin/ <blank>

Không có gì đảm bảo rằng bất kỳ cái nào trong danh sách trên sẽ hoạt động, nhưng nhiều quản trị viên cẩu thả và lười biếng sẽ để nguyên các cài đặt mặc định. Trong những trường hợp đó, tên người dùng và mật khẩu mặc định sẽ cấp cho bạn quyền truy cập vào các camera bí mật và riêng tư trên khắp thế giới.

Bước 4: Tìm các Camera theo Quốc gia

Bây giờ chúng ta đã biết cách tìm các camera và có khả năng đăng nhập vào chúng bằng tên người dùng và mật khẩu mặc định, giờ chúng ta sẽ tìm hiểu cụ thể hơn và cố gắng tìm webcam ở một vị trí địa lý cụ thể. Ví dụ: nếu mình quan tâm đến webcam của nhà sản xuất WebcamXP ở Úc, thì mình có thể tìm thấy chúng bằng cách nhập webcamxp country:AU vào khung tìm kiếm trên Shodan.

Vậy chúng ta sẽ thực hiện tìm kiếm nâng cao trong dòng lệnh như thế nào? Dưới đây là danh sách nhanh một số thứ bạn có thể tìm kiếm trong Shodan thông qua dòng lệnh:

after:              Search by a timeframe delimiter for things after a certain date.

asn:                Search by the autonomous system number.

before:             Search by a timeframe delimiter for things before a certain date.

city:               Search by the city where the device is located.

country:            Search by the country where the device is located (two-letter code).

device:             Search by the device or network’s name.

devicetype:         Search by the type of device (webcam, router, etc.).

domain:             Search an array of strings containing the top-level domains for the hostnames of the device.

geo:                Search by the coordinates where the device is located.

hash:               Search by the banner hash.

has_screenshot:true Search for devices where a screenshot is present.

hostname:           Search by the hostname that has been assigned to the IP address for the device.

ip:                 Search by the IP address of the host as an integer.

ip_str:             Search by the IP address of the host as a string.

ipv6:               Search by the IPv6 address of the host as a string.

isp:                Search by the ISP that is providing the organization with the IP space for the device.

link:               Search by the network link type. Possible values are: “Ethernet or modem”, “generic tunnel or VPN”, “DSL”, “IPIP or SIT”, “SLIP”, “IPSec or GRE”, “VLAN”, “jumbo Ethernet”, “Google”, “GIF”, “PPTP”, “loopback”, “AX.25 radio modem”.

net:                Filter by network range or IP in CIDR notation.

port:               Find devices based on the open ports/ software.

org:                Search for devices that are on a specific organization’s network.

os:                 Search by the operating system that powers the device.

state:              Search by the state where the device is located (two-letter code).

title:              Search by text within the title of the website as extracted from the HTML source.

Nếu bạn muốn trực tiếp tìm kiếm quốc gia webcamxp:AU từ dòng lệnh, bạn sẽ cần làm theo các lệnh bên dưới. Tuy nhiên, nếu bạn không sử dụng gói trả phí, bạn không thể sử dụng API Shodan để thực hiện các tìm kiếm chi tiết như mình đang thực hiện ở đây. Nhưng bạn vẫn có thể thực hiện tìm kiếm nâng cao trên trang web của Shodan, với các hạn chế thường xuyên dành cho người dùng miễn phí.

~$ shodan search webcamxp country:AU

~$ shodan search device:webcamxp country:AU

Trên trang web, tìm kiếm quốc gia webcamxp:AU sẽ hiển thị danh sách mọi WebcamXP ở Úc được kích hoạt web trong chỉ mục của Shodan.

Cách tìm các Camera dễ bị xâm nhập bằng Shodan 25

Bước 5: Tìm kiếm Webcam từ một thành phố

Để cụ thể hơn, chúng ta có thể thu hẹp tìm kiếm của mình xuống một thành phố riêng lẻ. Hãy xem những gì chúng ta có thể tìm thấy ở Sydney, Úc, bằng cách gõ webcamxp city: sydney vào thanh tìm kiếm của Shodan. Đối với dòng lệnh, nó sẽ là các lệnh sau – nhưng đây là một tính năng dành cho bản trả phí.

~$ shodan search webcamxp city:sydney

~$ shodan search device:webcamxp city:sydney

Trên trang web Shodan, đây là kết quả.

Cách tìm các Camera dễ bị xâm nhập bằng Shodan 26

Khi chúng ta nhấp vào một trong những liên kết này, chúng ta sẽ xem được camera ở Sydney, Úc.

Cách tìm các Camera dễ bị xâm nhập bằng Shodan 27

Bước 6: Shodan từ Command Line

Một thứ chúng ta có thể làm từ Command Line mà không thể làm từ trang web là tìm kiếm thông tin trên máy chủ. Ví dụ: chúng ta có thể chạy lệnh shodan myip để xuất IP bên ngoài của chúng ta.

~$ shodan myip

174.███.██.███

Khi đã biết, chúng ta có thể tìm kiếm thông tin trên Shodan bằng cách chạy lệnh host.

~$ shodan host 174.███.██.███

174.███.██.███

Hostnames:               cpe-174-███-██-███.socal.res.rr.com

Country:                 United States

Organization:            Spectrum

Updated:                 2019-08-02T23:04:59.182949

Number of open ports:    1

Ports:

     80/tcp

Shodan là một cách mạnh mẽ để khám phá các thiết bị trên mạng

Mình hy vọng bài viết ngắn này về Shodan sẽ kích thích trí tưởng tượng của bạn về những cách sáng tạo mà bạn có thể tìm thấy camera riêng tư ở bất kỳ đâu trên thế giới. Nên nhớ, xâm nhập trái phép camera người khác là bạn đang vi phạm pháp luật, thay vào đó hãy cố gắng thông báo cho chủ sở hữu để họ có biện pháp khắc phục nhé.

Ngoài ra, bạn cũng có thể xem qua Shodan Eye – Công cụ thu thập thông tin tất cả các thiết bị kết nối Internet tại đây.

Nguồn: anonyviet.com