Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-07-2010, 01:57 PM
beach-life beach-life is offline
Registered User
 
Join Date: Jun 2010
Posts: 1
Sending a UDP packet

I am new to this forum, but have used SecureCRT for approx. 4 years. I would like to write a simple script to perform a port knocking function to unblock the SSH port before connecting. But within the scripting environment, I cannot figure out how to send a simple UDP packet.

Here's the plan... On the server (Linux) block all access to TCP/UDP ports except for established connections and a port knocking UDP port. Write a simple daemon to monitor the UDP port. When a packet arrives for the UDP port, treat it as a port knocking OTP (One-Time Password). For the OTP I'm looking at using a Yubikey OTP key (http://www.yubico.com/products/yubikey). If the OTP is successfully authenticated, the daemon would unblock the SSH port for the source IP of the OTP packet (for a limited time, ~ 30 seconds).

On the SecureCRT side... I need SecureCRT to prompt for the Yubikey OTP and then send the OTP via a UDP packet. From the SecureCRT scripting examples, I can prompt for the OTP using a dialog box, but I can not figure out to send a UDP packet.

So, is there any way to send a UDP packet from within a SecureCRT script?
Reply With Quote
  #2  
Old 06-07-2010, 06:38 PM
miked's Avatar
miked miked is offline
Registered User
 
Join Date: Feb 2004
Posts: 2,040
It's not currently possible to implement port knocking through SecureCRT, but it's an idea we've considered. I've added your request to our database and we will post here if we implement port knocking capabilities in a future release. Our current SecureCRT features do not offer UDP functions but do support ActiveX components, so if you can find an ActiveX object that supports UDP transmissions then you could possibly implement something along the lines you're thinking about. It's outside the scope of something we have any familiarity with so it isn't likely something we'd be able to provide much guidance with.
__________________
Mike
VanDyke Software
Technical Support
[http://www.vandyke.com/support]

Last edited by jdev; 06-07-2010 at 06:48 PM.
Reply With Quote
  #3  
Old 09-20-2013, 12:22 PM
Maureen's Avatar
Maureen Maureen is offline
VanDyke Product Director
 
Join Date: Feb 2004
Location: Albuquerque, NM
Posts: 1,591
Support for executing a local shell command before connecting to the remote system, which allows port knocking to be done, has been added to a pre-beta
version of SecureCRT. If you would be interested in trying it, please send email to me at Maureen.Jett@vandyke.com.

Maureen
Reply With Quote
  #4  
Old 09-23-2013, 07:42 AM
ogun ogun is offline
Registered User
 
Join Date: Sep 2013
Posts: 15
If the SecureCRT python module on windows would support the socket module, you could easily use the normal python networking capabilities.

This would also allow a lot of interesting uses of the urllib module as well.
Reply With Quote
  #5  
Old 09-23-2013, 09:02 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,306
Hi ogun,

Thanks for the post. I have created a feature request to add support for the _socket module. Should we do so in a future SecureCRT release, we will post to this thread.

If you would like to be notified directly, please complete and submit the form at the following location:
Submit Feature Request
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #6  
Old 09-29-2020, 12:16 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,474
Hi all,

I wanted to let you know the __socket module should be available as of SecureCRT v9.0, currently in beta 1 release, since this support was added:

Changes in SecureCRT 9.0 (Beta 1) -- September 24, 2020
-------------------------------------------------------
New Features:

  • Windows: Added support for Python 3. Python 3.8(available at python.org) must be installed and the script's first line must be: # $language = "python3". Since support for Python 3 is provided through an external module, Python 3 libraries can be used in SecureCRT scripts.

Note that this is Windows only support at this time. In fact, we released beta 1 installers *only* for Windows. We hope to include all platforms in later releases.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 06:43 AM.