Error server asked us to run csd hostscan

На Ubuntu 16.04 я получаю следующую ошибку: $ openconnect-v vpn.com POST https://vpn.com/Пытающийся соединиться с сервером 1.1.1.1:443 согласование SSL с vpn.com, Связанным с HTTPS на vpn....

На Ubuntu 16.04 я получаю следующую ошибку:

$ openconnect -v vpn.com
POST https://vpn.com/
Attempting to connect to server 1.1.1.1:443
SSL negotiation with vpn.com
Connected to HTTPS on vpn.com
Got HTTP response: HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Cache-Control: no-cache
Pragma: no-cache
Connection: Keep-Alive
Date: Mon, 22 Aug 2016 00:04:14 GMT
X-Frame-Options: SAMEORIGIN
X-Aggregate-Auth: 1
HTTP body chunked (-2)
XML POST enabled
Error: Server asked us to run CSD hostscan.
You need to provide a suitable --csd-wrapper argument.
Failed to obtain WebVPN cookie

Я попробовал --no-xmlpost post и получил ошибку также.

Вот некоторый фон:
Я имел Ubuntu 14.04 и соединялся с vpn сервером с помощью openconnect. Затем неделю назад, это прекратило работать с этой проблемой. Мое предположение — то, что vpn сайт обновил свою Cisco vpn сервер к необходимому троянцу CSD. Во всяком случае я решил обновить до 16,04 и все еще иметь ту же проблему.

задан
26 September 2018 в 08:12

поделиться

3 ответа

Я нашел свой ответ через это сообщение:
https://gist.github.com/l0ki000/56845c00fd2a0e76d688

я сделал следующее:

cd ~  
mkdir .cisco  
cd .cisco  
wget https://gist.githubusercontent.com/l0ki000/56845c00fd2a0e76d688/raw/61fc41ac8aec53ae0f9f0dfbfa858c1740307de4/csd-wrapper.sh  
chmod +x csd-wrapper.sh  

Редактирование файл с vpn сервером:

CSD_HOSTNAME=vpnserver.com  

Выполнение Выполнение файла

./csd-wrapper.sh  

openconnect:

sudo openconnect --csd-user=YOURLINUXUSERNAME --csd-wrapper=/home/YOURLINUXUSERNAME/.cisco/csd-wrapper.sh vpnserver.com  

ответ дан Maura
23 November 2019 в 02:48

поделиться

Я нашел, что должен был указать — os=win также. Это, казалось, работало вокруг 404 ответов, которые сервер генерировал при попытке загрузить sfinst.

GET https://vpn.company.com/CACHE/sdesktop/install/binaries/sfinst
Got HTTP response: HTTP/1.1 404 Not Found (does not exist)

информация о 404 для проблемы sfinst может быть найдена в openconnect-devel списке рассылки» Соединение с Linux, когда CSD доступен » сообщение.

я имел успех со следующей командой, которая использует флаг OS и флаг csd-обертки вместе:

sudo openconnect 
    --user <USERNAME> 
    --cert-expire-warning=15 
    --certificate <CERTFILE> 
    --os=win 
    --csd-user=<USERNAME> 
    --csd-wrapper=<PATHTO>/csd-wrapper.sh 
    https://<VPNADDRESS e.g., vpn.company.com>

ответ дан D.A.P.
23 November 2019 в 02:48

поделиться

У меня была эта Ошибка в Ubuntu 18.04
Я смог соединиться с сервером с помощью ссылки ниже и второго ответа.

просто используйте -v флаг

sudo openconnect -v NAMESERVER.COM

ответ дан abu_bua
23 November 2019 в 02:48

поделиться

I replaced 443 with 8000 because faced the next error:

go run hostscan-bypass.go -l 127.0.0.1 -p 443 -r someserver.com:443 -s

panic: failed to connect: listen tcp 127.0.0.1:443: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

goroutine 1 [running]:
main.startListener(0x1)
c:/Plays/hostscan-bypass/hostscan-bypass.go:244 +0x988
main.main()
c:/Plays/hostscan-bypass/hostscan-bypass.go:329 +0x446
exit status 2

Example of the repetitive output:

go run hostscan-bypass.go -l 127.0.0.1 -p 8000 -r someserver.com:443 -s

[] Listening for AnyConnect client connection..
[
] Accepted from: 127.0.0.1:56333
[][0] Connected to server: x.x.x.x:443
EOF
read tcp 192.168.0.89:56334->x.x.x.x:443: use of closed network connection
[
] Accepted from: 127.0.0.1:56335
[*][1] Connected to server: x.x.x.x:443
From Client [1]:
00000000 50 4f 53 54 20 2f 20 48 54 54 50 2f 31 2e 31 0d |POST / HTTP/1.1.|
00000010 0a 43 61 63 68 65 2d 43 6f 6e 74 72 6f 6c 3a 20 |.Cache-Control: |
00000020 6e 6f 2d 63 61 63 68 65 0d 0a 43 6f 6e 6e 65 63 |no-cache..Connec|
00000030 74 69 6f 6e 3a 20 63 6c 6f 73 65 0d 0a 50 72 61 |tion: close..Pra|
00000040 67 6d 61 3a 20 6e 6f 2d 63 61 63 68 65 0d 0a 48 |gma: no-cache..H|
00000050 6f 73 74 3a 20 6c 6f 63 61 6c 68 6f 73 74 3a 38 |ost: localhost:8|
00000060 30 30 30 0d 0a 55 73 65 72 2d 41 67 65 6e 74 3a |000..User-Agent:|
00000070 20 41 6e 79 43 6f 6e 6e 65 63 74 20 57 69 6e 64 | AnyConnect Wind|
00000080 6f 77 73 20 34 2e 38 2e 30 33 30 35 32 0d 0a 58 |ows 4.8.03052..X|
00000090 2d 54 72 61 6e 73 63 65 6e 64 2d 56 65 72 73 69 |-Transcend-Versi|
000000a0 6f 6e 3a 20 31 0d 0a 58 2d 41 6e 79 43 6f 6e 6e |on: 1..X-AnyConn|
000000b0 65 63 74 2d 53 54 52 41 50 2d 50 75 62 6b 65 79 |ect-STRAP-Pubkey|
…………………………………………………………………..
00000140 58 2d 41 67 67 72 65 67 61 74 65 2d 41 75 74 68 |X-Aggregate-Auth|
00000150 3a 20 31 0d 0a 43 6f 6e 74 65 6e 74 2d 4c 65 6e |: 1..Content-Len|
00000160 67 74 68 3a 20 37 34 34 0d 0a 0d 0a |gth: 744….|

From Client [1]:
00000000 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 |.<config-a|
00000030 75 74 68 20 63 6c 69 65 6e 74 3d 22 76 70 6e 22 |uth client=»vpn»|
00000040 20 74 79 70 65 3d 22 69 6e 69 74 22 20 61 67 67 | type=»init» agg|
00000050 72 65 67 61 74 65 2d 61 75 74 68 2d 76 65 72 73 |regate-auth-vers|
00000060 69 6f 6e 3d 22 32 22 3e 0a 3c 76 65 72 73 69 6f |ion=»2″>.<versio|
00000070 6e 20 77 68 6f 3d 22 76 70 6e 22 3e 34 2e 38 2e |n who=»vpn»>4.8.|
00000080 30 33 30 35 32 3c 2f 76 65 72 73 69 6f 6e 3e 0a |03052.|
00000090 3c 64 65 76 69 63 65 2d 69 64 20 63 6f 6d 70 75 |<device-id compu|
…………………………………………………………………..
00000250 6d 65 74 68 6f 64 3e 6d 75 6c 74 69 70 6c 65 2d |method>multiple-|
00000260 63 65 72 74 3c 2f 61 75 74 68 2d 6d 65 74 68 6f |cert</auth-metho|
00000270 64 3e 0a 3c 61 75 74 68 2d 6d 65 74 68 6f 64 3e |d>.|
00000280 73 69 6e 67 6c 65 2d 73 69 67 6e 2d 6f 6e 3c 2f |single-sign-on</|
00000290 61 75 74 68 2d 6d 65 74 68 6f 64 3e 0a 3c 61 75 |auth-method>.<au|
000002a0 74 68 2d 6d 65 74 68 6f 64 3e 73 69 6e 67 6c 65 |th-method>single|
000002b0 2d 73 69 67 6e 2d 6f 6e 2d 76 32 3c 2f 61 75 74 |-sign-on-v2</aut|
000002c0 68 2d 6d 65 74 68 6f 64 3e 3c 2f 63 61 70 61 62 |h-method></capab|
000002d0 69 6c 69 74 69 65 73 3e 0a 3c 2f 63 6f 6e 66 69 |ilities>.</confi|
000002e0 67 2d 61 75 74 68 3e 0a |g-auth>.|

EOF
read tcp 192.168.0.89:56336->x.x.x.x:443: use of closed network connection
[] Accepted from: 127.0.0.1:56337
[
][2] Connected to server: x.x.x.x:443
EOF
read tcp 192.168.0.89:56338->x.x.x.x:443: use of closed network connection
[] Accepted from: 127.0.0.1:56339
[
][3] Connected to server: x.x.x.x:443
From Client [3]:
Repeated the same content as From Client[1]

From Client [3]:
Repeated the same content as From Client[1]

EOF
read tcp 192.168.0.89:56340->x.x.x.x:443: use of closed network connection
[] Accepted from: 127.0.0.1:56341
[
][4] Connected to server: x.x.x.x:443
EOF
read tcp 192.168.0.89:56342->x.x.x.x:443: use of closed network connection
[] Accepted from: 127.0.0.1:56343
[
][5] Connected to server: x.x.x.x:443
From Client [5]:
etc…………………………………………………………………

Contents

Introduction

This document describes how to resolve a Cisco AnyConnect Secure Mobility Client connection error if you deploy Hostscan on Linux.

Prerequisites

Requirements

Cisco recommends that you have knowledge of these topics:

  • Cisco AnyConnect
  • Cisco Secure Desktop (CSD)
  • Linux

Components Used

The information in this document affects Linux users who run CSD Hostscan.

The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.

Problem

When a Linux user runs Cisco Anyconnect in conjunction with CSD Hostscan, an error message appears that indicates the Posture Assessment Failed with a Hostscan Initialize error:

116040-problemsolution-product-01.png

In the libcsd.log file, an error message indicates that the certificate used in order to sign the CSD Hostscan binary has expired:

[Thu Feb 07 18:52:15.774 2013][libcsd][all][csd_init]
  hello
[Thu Feb 07 18:52:15.774 2013][libcsd][all][csd_init]
  libcsd.so version 3.1.02040
[Thu Feb 07 18:52:15.774 2013][libcsd][debug]
  [hs_transport_init] initialization
[Thu Feb 07 18:52:15.774 2013][libcsd][debug]
  [hs_file_verify_with_killdate] verifying file
  signature: file = [/opt/cisco/anyconnect/lib/libaccurl.so.4.2.0],
  signer = [Cisco Systems, Inc.], type = [2] [Thu Feb 07 18:52:15.963 2013][libcsd][error][verify_cb]
  Error 10, certificate has expired
[Thu Feb 07 18:52:15.963 2013][libcsd][error][verify_cert]
  Certificate is not trusted
[Thu Feb 07 18:52:15.964 2013][libcsd][error]
  [hs_file_verify_with_killdate] unable to verify
  the certificate trust.
[Thu Feb 07 18:52:15.964 2013][libcsd][error][hs_dl_load_global]
  file signature invalid, not
  loading library (/opt/cisco/anyconnect/lib/libaccurl.so.4.2.0).

Note: Mac and Windows users are not affected by this issue. This is because the Mac and Windows client code verifies that the certificate used for signing is valid at the time of code signing, whereas the Linux client code checks if the certificate used for signing is currently valid.

Solution

Since the problem is caused by the date on which the certificate was signed, you can change the system clock in order to allow the user to connect; however, this is not a fix.

Cisco bug ID CSCue49663 (registered customers only) was filed in order to resolve this problem. In order to get the fix, upgrade to AnyConnect Version 3.1.02043, or upgrade only the Hostscan Engine package to Version 3.0.11046, as shown here:

webvpn 
enable outside 
csd hostscan image disk0:/hostscan_3.1.02043-k9.pkg
csd enable 
anyconnect image disk0:/anyconnect-win-3.1.02040-k9.pkg 1 regex "Windows NT" 
anyconnect image disk0:/anyconnect-macosx-i386-3.1.02040-k9.pkg 2 regex "Mac OS" 
anyconnect image disk0:/anyconnect-linux-3.1.02043-k9.pkg* 3 regex "Linux"

Note: These inks connect to the correct versions of the software downloads (registered customers only).

Сейчас многие люди переходят на удаленную работу. Среди прочего часто используется программа Cisco Anyconnect. И многие, пользуясь инструкцией своих администраторов, спокойно запускают эту мерзость на своих домашних устройствах. Вот зря. Во-первых, спокойно зря, во-вторых зря запускают.

У меня этот вид доступа был уже очень давно. И в один прекрасный момент он вдруг перестал работать. Подчеркну, что у меня Linux, что меня и спасло. Выяснилось, что в параметрах сервера включили CSD Host Scan.

С сайта Cisco описание

Цитата:

Using the secure desktop manager tool in the Adaptive Security Device Manager (ASDM), you can create a prelogin policy which evaluates the operating system, anti-virus, anti-spyware, and firewall software Host Scan identifies. Based on the result of the prelogin policy’s evaluation, you can control which hosts are allowed to create a remote access connection to the security appliance.

The Host Scan support chart contains the product name and version information for the anti-virus, anti-spyware, and firewall applications you use in your prelogin policies. We deliver Host Scan and the Host Scan support chart, as well as other components, in the Host Scan package.

Расшифровываю: когда вы подключаетесь к VPN, к вам на устройство загружается троян, который проверяет его (или делает, что угодно другое) и сообщает по сети что-то на сервер VPN. Поскольку для мака или для Linux наши … умельцы из безопасности троянов не завезли, я и обламывался…

Ради интереса поставил в виртуалку Anyconnect

Антивирусы эту штуку не детектят. Зато в man openconnect, например, именно и называют ее трояном, что по сути так и есть

Что мне в этой гадости не нравится, помимо того, что я в принципе категорически против, чтобы что-то без моего ведома скачивалось хз откуда и запускалось:
1. Это не в составе вашего VPN, а совершенно отдельная хреновина, которая каждый раз при изменении скачивается с сервера VPN. Теоретически администратор сервера VPN может запускать у вас все, что ему угодно.
2. В моем случае софтинка еще и сильно старая, 2016 года. А, например, в 2018 были отзывы сертификатов. Т.е. зависимость от кривых рук администратора сильно напрягает, превращая удаленный доступ в потенциальную дыру.

Всем использующим Cisco AnyConnect настоятельно рекомендую запускать ее в изолированном окружении. Т.е. на отдельном ноуте (выданном на предприятии, например) или в виртуальной среде.

Понравилась статья? Поделить с друзьями:
  • Error serial was not declared in this scope
  • Error serial does not name a type
  • Error sequence contains no matching element
  • Error sending to rk7srv
  • Error sending to rk7