Giter VIP home page Giter VIP logo

bitwarden-securecrt-integration's Introduction

Bitwarden-SecureCRT Integration

DISCLAIMER

I am not a professional programmer, but I am a network engineer who is approaching the world of automation, I am aware that the code is not perfect and I am open to any advice. I hope somebody will find this useful.

Introduction

SecureCRT is an excellent product and is one of the most used tools by a network engineer, but currently does not have a plug-in that meets my need to interface it to an external password manager, avoiding saving credentials within sessions.

The integration works thanks to a mixture of Python and Powershell combined with the official Bitwarden command line and has been designed for connection to Cisco devices but is easily adaptable for other vendors.

Operation

When you launch a session on an SSH or Telnet device, SecureCRT launches a python script which in turn launches PowerShell subprocesses that interact with the Bitwarden CLI extracting username and password and enable password. These parameters are automatically sent to the active SecureCRT tab and then complete the login.

Prerequisites

  1. SecureCRT version 9.0 and Python 3.8 installed. Beginning in version 9.0, SecureCRT on the Windows platform supports the use of a third party python v3.8 scripting engine. More information here: https://forums.vandyke.com/showthread.php?t=14295
  2. Bitwarden CLI Installed. Download here https://bitwarden.com/help/cli/ NOTE: On my PC I just copied the executable on the bitwarden-securecrt folder but as you can see from the official documentation there are several ways to install it.

SETUP

WINDOWS

1. Go to %LOCALAPPDATA%
2. Paste the bitwarden-securecrt folder
3. Add %LOCALAPPDATA%\bitwarden-securecrt\ to the Windows Path variable

(How to set the path and environment variables in Windows)

SecureCrt

Add Bitwarden session (Powershell local shell)

- New Session → Local Shell → C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
  - In "Logon Action" section tick the Automate Logon box and add new string:
  - Expect:>
  - Send: Invoke-Expression "${env:LOCALAPPDATA}\\bitwarden-securecrt\\bwlogin.ps1"

Add the SSH Session (example Cisco Router)

LOGON ACTIONS
- Paste this in the Logon Script field: %LOCALAPPDATA%\bitwarden-securecrt\login_cisco.py
- Tick Display logon prompts in terminal window

In the SSH2 section make sure that you set the Keyboard Interactive authentication first.

Bitwarden

1. Create the item TEST-LOGIN-DO-NOT-DELETE and set the username to TEST password empty. The bwlogin.ps1 use this to test the SESSION KEY
2. Create the item with the same name as the SSH session previously created on SecureCRT

bitwarden-securecrt-integration's People

Contributors

steragnoli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.