SlideShare a Scribd company logo
Creating One Time Password (OTP)
infrastructures using
Open Source sofware

Giuseppe “Gippa” Paternò
Visiting Researcher
Trinity College Dublin
Who am I
●

Visiting Researcher at Trinity College Dublin (Ireland)

●

Solution Architect and EMEA Security Expert in Red Hat

●

Previously Security Solution Architect in Sun and also in IBM

●

Red Hat Certified Security Specialist (RHCSS), Red Hat Certified
Architect (RHCA) and Cisco Certified Network Professinal (CCNP)

●

Part of the italian security community sikurezza.org

●

Published books and whitepapers

●

Forensic analisys for local govs

●

More on:
–

http://www.scss.tcd.ie/Giuseppe.Paterno/

–

http://www.gpaterno.com/

–

http://www.linkedin.com/in/gpaterno
Disclaimer
I do not speak on behalf of my employer, nor I am
authorized to represent it publicly.
All and any opinion and results expressed in this
presentation are solely mine and do not represent my
employer point-of-view.
All the tests and any project contribution are done as
a TCD researcher out of business hours.
Global IT scenario

●

●

Even more in this recession phase, the IT budget
is getting lower and lower
The projects (demand) are increasing with
significantly less money available
Lowering TCO
"The economic crisis is going to be a catalyst for
open source, much like the technology crash of
2001 catapulted Linux front and center"
Laurie Wurster, a Gartner analyst.

The adoption of Open Source
software can lower the TCO
… and increase your security!
How Open Source
can increase
Security?

Open Source = Open Standards = Choice
The OATH Alliance
●

The Initiative for Open Authentication (OATH)

●

Open alliance of vendors
–

●
●

ActiveIdentity, Vasco, Gemalto, Aladdin, ...

http://www.openauthentication.org/
Created a common algorithm for one time password
tokens (HOTP)
–

A common “protocol” for the interoperability of the
several impementations available
What is HOTP
●

●

An HMAC-Based One-Time Password Algorithm
(HOTP)
A common shared algorithm that is meant to
facilitate the adoption of two-factor
authentication

●

Alogorithm published as RFC 4226

●

The complete standard on:
–

http://www.rfc-editor.org/
HOTP: Internals
The algorithm is:
HOTP(K,C) = Truncate(HMAC-SHA-1(K,C))
K

Shared key between client and server

C

8-byte counter value syncronized between client
and server

Truncate()

Perform a dynamic truncation and reduction of
the string to extract a 4-byte dynamic binary
code.
The result must extract minimum a 6-digit code,
but also 7 and 8-digit code
Anathomy of HOTP
●

The shared key between the OTP peers (token
and authenticator) is an hexadecimal string
–

●

The lenght is a SHA-1 digest

Example of generating a new HMAC 6-digit
shared key:
dd if=/dev/random bs=4096 count=1 2>/dev/null |
sha1sum | awk '{print $1}'
HOTP implementations
●

●

●

●

Both commercial and open source
implementations available
Most of the hardware tokens adhere to the HOTP
algorithm
Few software implementations, most of which
proprietary/closed source
Some software client available:
–

J2ME, iPhone and Windows Mobile

–

Publically available algorithm makes it simple to
implement a client
How does it fit all together?
The software
●

An open source OTP server:
–

Only one server implementation available
(OTPD), formelly from TRI-D Systems

–

Now I made it available on
http://otpd.googlecode.com

●

FreeRADIUS, the popular radius server for Linux

●

Two tested freely available client:
–
–

●

oathdsss.jar (DSSS) for Java MIDP (Nokia)
iToken (Quest Software) for iPhone

Also tried some hardware tokens
OTPD server
●

It handle the validation of the One Time
Passwords
–

Uses files and LDAP as repository

●

Keeps the state of the OTP token (counter)

●

Supported tokens:
–
–

CRYPTOCard

–
●

HOTP
Plain old x9.9 (based on DES, unsecure!)

It listen to autentication requests
FreeRADIUS
●

Well known high-performance open source
RADIUS server
–
–

●

Handle authentication and accounting
Plug-in based

One of the plug-in is rlm_otpd
–

Developed by TRI-D Systems

–

Communicate via Unix sockets with the OTPD
server to verify an OTP token
The soft-token
●

An OTP token in software

●

Less “secure” than an hardware
–

●

What if my laptop is stolen?

A compromise is using a softtoken on a mobile platform
–

Easy to manage

–

Lower costs

–

Better security over a “fat”
client on laptops/desktops

–

Available for most mobile
phones
What can I authenticate?
●

Any RADIUS compliant system, ex:
–
–

Wireless LANs

–

Routers/network equipments

–

Core UNIX systems (through pam_radius)

–
●

VPN systems

Captive portals

Any application can use the RADIUS protocol:
–

common APIs available in C, PHP, Python, Ruby,
Java (J2EE)
Enteprise scenario
Demo scenario
●

Authentication server:
–

OTP Server

–

FreeRADIUS Server

●

Client UNIX

●

Web application (PHP)

●

Centralized Web Single Sign-On (CAS)
Demo (the clients)
●

Client Unix
–
–

●

Interactive log-in
Leverage the pam_radius module

Web Single Sign-On
–
–

●

Based on Yale CAS
Customized to login through RADIUS

PHP web application
–

Dummy application to demonstrate CAS' capabilities
with OTP integration

–

Virtually every application can leverage CAS
architecture
Demo scenario (big picture)
Interactive log-in
OTP/Radius Server
Authentication
Request
(RADIUS)

Log-on
request
Web Application
OTP/Radius Server

Redirect to
CAS' Single
Sign-on Portal
Authentication
Request
(RADIUS)

Web Access
Demo now!
Thank you!!
Giuseppe “Gippa” Paternò
Visiting Researcher
Trinity College Dublin
paternog@cs.tcd.ie
http://www.scss.tcd.ie/Giuseppe.Paterno/
http://www.gpaterno.com/

More Related Content

PPT
Cartes Asia Dem 2010 V2
PPTX
SecureOTP: Total One-Time-Password Solution
PPT
10 1 otp all
PDF
One-Time Password
PDF
Secure Your Encryption with HSM
PDF
Create a-strong-two-factors-authentication-device-for-less-than-chf-100
PPTX
Certificate pinning in android applications
PPTX
How to do Cryptography right in Android Part One
Cartes Asia Dem 2010 V2
SecureOTP: Total One-Time-Password Solution
10 1 otp all
One-Time Password
Secure Your Encryption with HSM
Create a-strong-two-factors-authentication-device-for-less-than-chf-100
Certificate pinning in android applications
How to do Cryptography right in Android Part One

What's hot (20)

PPTX
How to do right cryptography in android part 3 / Gated Authentication reviewed
PDF
Cryptography101
PPTX
HSM (Hardware Security Module)
PPTX
Bypass Security Checking with Frida
PDF
CNIT 141: 13. TLS
PDF
Operation emmental appsec
PPTX
How to do Cryptography right in Android Part Two
PDF
CNIT 129S Ch 7: Attacking Session Management
PDF
Defcon 22-alex zacharis-nikolaos-tsagkarakis-po s-attacking-t
PPTX
Infrastructure Saturday 2011 - Understanding PKI and Certificate Services
PDF
CNIT 141: 13. TLS
PDF
CRYPTOGRAPHY AND NETWORK SECURITY
PDF
Pki 201 Key Management
PPTX
Malware for Red Team
PDF
18CS2005 Cryptography and Network Security
PDF
Mobile Authentication - Moving Towards a Passwordless Future
PDF
18CS2005 Cryptography and Network Security
PDF
18CS2005 Cryptography and Network Security
PDF
Extracting the Painful (Blue)Tooth - Presentation
PPTX
PBKDF2: Storing Sensitive Data Securely in Android Applications
How to do right cryptography in android part 3 / Gated Authentication reviewed
Cryptography101
HSM (Hardware Security Module)
Bypass Security Checking with Frida
CNIT 141: 13. TLS
Operation emmental appsec
How to do Cryptography right in Android Part Two
CNIT 129S Ch 7: Attacking Session Management
Defcon 22-alex zacharis-nikolaos-tsagkarakis-po s-attacking-t
Infrastructure Saturday 2011 - Understanding PKI and Certificate Services
CNIT 141: 13. TLS
CRYPTOGRAPHY AND NETWORK SECURITY
Pki 201 Key Management
Malware for Red Team
18CS2005 Cryptography and Network Security
Mobile Authentication - Moving Towards a Passwordless Future
18CS2005 Cryptography and Network Security
18CS2005 Cryptography and Network Security
Extracting the Painful (Blue)Tooth - Presentation
PBKDF2: Storing Sensitive Data Securely in Android Applications
Ad

Viewers also liked (20)

PPTX
One Time Password - A two factor authentication system
PPTX
One time password(otp)
ODP
One Time Password
PPT
Strong Authentication - Open Source
PDF
[artifactconf] Github for People Who Don't Code
PDF
Two factor Authentication using Telegram Messenger - www.tgauth.com
PPT
Security Tokens
PDF
Shariff V10- BSc (Hons) Project
PDF
카카오팬 보안OTP가이드
PDF
Open (source) API for the Internet of Things - APIdays 2013
PDF
Profiling Ruby
PPTX
Evolution of it in 2020
PDF
08 인터페이 t zsign 소개-dcamp_150630
PDF
Selenium and Open Source Advanced Testing
PDF
Google Authenticator, possible attacks and prevention
PDF
핀테크 기업조사- TransferWise, CurrencyCloud, TOSS
PDF
Retail Banking 2020: evolution or revolution
PDF
Sua 정보보호관리체계 cissp_접근통제_강의교안
PPTX
WiFi HotSpot Marketin
PDF
Open Source in the Cloud Computing Era
One Time Password - A two factor authentication system
One time password(otp)
One Time Password
Strong Authentication - Open Source
[artifactconf] Github for People Who Don't Code
Two factor Authentication using Telegram Messenger - www.tgauth.com
Security Tokens
Shariff V10- BSc (Hons) Project
카카오팬 보안OTP가이드
Open (source) API for the Internet of Things - APIdays 2013
Profiling Ruby
Evolution of it in 2020
08 인터페이 t zsign 소개-dcamp_150630
Selenium and Open Source Advanced Testing
Google Authenticator, possible attacks and prevention
핀테크 기업조사- TransferWise, CurrencyCloud, TOSS
Retail Banking 2020: evolution or revolution
Sua 정보보호관리체계 cissp_접근통제_강의교안
WiFi HotSpot Marketin
Open Source in the Cloud Computing Era
Ad

Similar to Creating OTP with free software (20)

PPTX
An open source strong authentication server for less than $100!
PPT
Security and Authentication at a Low Cost
PDF
Strong Authentication in Web Application #SCS III
PDF
2FA and OTP
PDF
Strong Authentication State of the Art 2012 / Sarajevo CSO
PDF
2FA OTP Hard Token
PDF
Building your own web based Authenticator
PDF
How to 2FA-enable Open Source Applications
PPTX
PPTX
Privileged Access Management (PAM): A Deep Dive into Modern Authentication: O...
PDF
Two Factor Authentication Using Smartphone Generated One Time Password
PDF
Transecq ITA
PDF
JDD2015: Security in the era of modern applications and services - Bolesław D...
PPTX
Post password era - Bernard Toplak, OWASP Croatia Meetup 2016
PDF
IRJET- Multi sharing Data using OTP
PDF
Kx3518741881
PDF
Android Based Total Security for System Authentication
PDF
Two-factor Authentication
PDF
Sichere Anmeldung im UCS Netzwerk – Multifaktor Authentisierung mit RCDevs Op...
PDF
RFC6749 et alia 20130504
An open source strong authentication server for less than $100!
Security and Authentication at a Low Cost
Strong Authentication in Web Application #SCS III
2FA and OTP
Strong Authentication State of the Art 2012 / Sarajevo CSO
2FA OTP Hard Token
Building your own web based Authenticator
How to 2FA-enable Open Source Applications
Privileged Access Management (PAM): A Deep Dive into Modern Authentication: O...
Two Factor Authentication Using Smartphone Generated One Time Password
Transecq ITA
JDD2015: Security in the era of modern applications and services - Bolesław D...
Post password era - Bernard Toplak, OWASP Croatia Meetup 2016
IRJET- Multi sharing Data using OTP
Kx3518741881
Android Based Total Security for System Authentication
Two-factor Authentication
Sichere Anmeldung im UCS Netzwerk – Multifaktor Authentisierung mit RCDevs Op...
RFC6749 et alia 20130504

More from Giuseppe Paterno' (15)

PDF
OpenStack e le nuove Infrastrutture IT
PDF
OpenStack Explained: Learn OpenStack architecture and the secret of a success...
PDF
Let's sleep better: programming techniques to face new security attacks in cloud
PDF
SecurePass at OpenBrighton
PDF
OpenStack: Security Beyond Firewalls
PDF
Remote security with Red Hat Enterprise Linux
PDF
Il problema dei furti di identità nelle infrastrutture Cloud e possibili rimedi
PDF
How the Post-PC era changed IT Ubuntu for next gen datacenters
PDF
Filesystem Comparison: NFS vs GFS2 vs OCFS2
PDF
Protecting confidential files using SE-Linux
PDF
Comparing IaaS: VMware vs OpenStack vs Google’s Ganeti
PDF
La gestione delle identità per il controllo delle frodi bancarie
PDF
Secure real-time collaboration with SecurePass and Etherpad
PDF
Identity theft in the Cloud and remedies
PDF
Il problema dei furti di identita' nelle infrastrutture Cloud e possibili rimedi
OpenStack e le nuove Infrastrutture IT
OpenStack Explained: Learn OpenStack architecture and the secret of a success...
Let's sleep better: programming techniques to face new security attacks in cloud
SecurePass at OpenBrighton
OpenStack: Security Beyond Firewalls
Remote security with Red Hat Enterprise Linux
Il problema dei furti di identità nelle infrastrutture Cloud e possibili rimedi
How the Post-PC era changed IT Ubuntu for next gen datacenters
Filesystem Comparison: NFS vs GFS2 vs OCFS2
Protecting confidential files using SE-Linux
Comparing IaaS: VMware vs OpenStack vs Google’s Ganeti
La gestione delle identità per il controllo delle frodi bancarie
Secure real-time collaboration with SecurePass and Etherpad
Identity theft in the Cloud and remedies
Il problema dei furti di identita' nelle infrastrutture Cloud e possibili rimedi

Recently uploaded (20)

PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
KodekX | Application Modernization Development
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Empathic Computing: Creating Shared Understanding
PPT
Teaching material agriculture food technology
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Approach and Philosophy of On baking technology
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Modernizing your data center with Dell and AMD
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Spectral efficient network and resource selection model in 5G networks
KodekX | Application Modernization Development
Understanding_Digital_Forensics_Presentation.pptx
MYSQL Presentation for SQL database connectivity
Empathic Computing: Creating Shared Understanding
Teaching material agriculture food technology
Mobile App Security Testing_ A Comprehensive Guide.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Big Data Technologies - Introduction.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Advanced methodologies resolving dimensionality complications for autism neur...
Dropbox Q2 2025 Financial Results & Investor Presentation
Approach and Philosophy of On baking technology
Machine learning based COVID-19 study performance prediction
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Digital-Transformation-Roadmap-for-Companies.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
The AUB Centre for AI in Media Proposal.docx
Modernizing your data center with Dell and AMD

Creating OTP with free software

  • 1. Creating One Time Password (OTP) infrastructures using Open Source sofware Giuseppe “Gippa” Paternò Visiting Researcher Trinity College Dublin
  • 2. Who am I ● Visiting Researcher at Trinity College Dublin (Ireland) ● Solution Architect and EMEA Security Expert in Red Hat ● Previously Security Solution Architect in Sun and also in IBM ● Red Hat Certified Security Specialist (RHCSS), Red Hat Certified Architect (RHCA) and Cisco Certified Network Professinal (CCNP) ● Part of the italian security community sikurezza.org ● Published books and whitepapers ● Forensic analisys for local govs ● More on: – http://www.scss.tcd.ie/Giuseppe.Paterno/ – http://www.gpaterno.com/ – http://www.linkedin.com/in/gpaterno
  • 3. Disclaimer I do not speak on behalf of my employer, nor I am authorized to represent it publicly. All and any opinion and results expressed in this presentation are solely mine and do not represent my employer point-of-view. All the tests and any project contribution are done as a TCD researcher out of business hours.
  • 4. Global IT scenario ● ● Even more in this recession phase, the IT budget is getting lower and lower The projects (demand) are increasing with significantly less money available
  • 5. Lowering TCO "The economic crisis is going to be a catalyst for open source, much like the technology crash of 2001 catapulted Linux front and center" Laurie Wurster, a Gartner analyst. The adoption of Open Source software can lower the TCO … and increase your security!
  • 6. How Open Source can increase Security? Open Source = Open Standards = Choice
  • 7. The OATH Alliance ● The Initiative for Open Authentication (OATH) ● Open alliance of vendors – ● ● ActiveIdentity, Vasco, Gemalto, Aladdin, ... http://www.openauthentication.org/ Created a common algorithm for one time password tokens (HOTP) – A common “protocol” for the interoperability of the several impementations available
  • 8. What is HOTP ● ● An HMAC-Based One-Time Password Algorithm (HOTP) A common shared algorithm that is meant to facilitate the adoption of two-factor authentication ● Alogorithm published as RFC 4226 ● The complete standard on: – http://www.rfc-editor.org/
  • 9. HOTP: Internals The algorithm is: HOTP(K,C) = Truncate(HMAC-SHA-1(K,C)) K Shared key between client and server C 8-byte counter value syncronized between client and server Truncate() Perform a dynamic truncation and reduction of the string to extract a 4-byte dynamic binary code. The result must extract minimum a 6-digit code, but also 7 and 8-digit code
  • 10. Anathomy of HOTP ● The shared key between the OTP peers (token and authenticator) is an hexadecimal string – ● The lenght is a SHA-1 digest Example of generating a new HMAC 6-digit shared key: dd if=/dev/random bs=4096 count=1 2>/dev/null | sha1sum | awk '{print $1}'
  • 11. HOTP implementations ● ● ● ● Both commercial and open source implementations available Most of the hardware tokens adhere to the HOTP algorithm Few software implementations, most of which proprietary/closed source Some software client available: – J2ME, iPhone and Windows Mobile – Publically available algorithm makes it simple to implement a client
  • 12. How does it fit all together?
  • 13. The software ● An open source OTP server: – Only one server implementation available (OTPD), formelly from TRI-D Systems – Now I made it available on http://otpd.googlecode.com ● FreeRADIUS, the popular radius server for Linux ● Two tested freely available client: – – ● oathdsss.jar (DSSS) for Java MIDP (Nokia) iToken (Quest Software) for iPhone Also tried some hardware tokens
  • 14. OTPD server ● It handle the validation of the One Time Passwords – Uses files and LDAP as repository ● Keeps the state of the OTP token (counter) ● Supported tokens: – – CRYPTOCard – ● HOTP Plain old x9.9 (based on DES, unsecure!) It listen to autentication requests
  • 15. FreeRADIUS ● Well known high-performance open source RADIUS server – – ● Handle authentication and accounting Plug-in based One of the plug-in is rlm_otpd – Developed by TRI-D Systems – Communicate via Unix sockets with the OTPD server to verify an OTP token
  • 16. The soft-token ● An OTP token in software ● Less “secure” than an hardware – ● What if my laptop is stolen? A compromise is using a softtoken on a mobile platform – Easy to manage – Lower costs – Better security over a “fat” client on laptops/desktops – Available for most mobile phones
  • 17. What can I authenticate? ● Any RADIUS compliant system, ex: – – Wireless LANs – Routers/network equipments – Core UNIX systems (through pam_radius) – ● VPN systems Captive portals Any application can use the RADIUS protocol: – common APIs available in C, PHP, Python, Ruby, Java (J2EE)
  • 19. Demo scenario ● Authentication server: – OTP Server – FreeRADIUS Server ● Client UNIX ● Web application (PHP) ● Centralized Web Single Sign-On (CAS)
  • 20. Demo (the clients) ● Client Unix – – ● Interactive log-in Leverage the pam_radius module Web Single Sign-On – – ● Based on Yale CAS Customized to login through RADIUS PHP web application – Dummy application to demonstrate CAS' capabilities with OTP integration – Virtually every application can leverage CAS architecture
  • 21. Demo scenario (big picture)
  • 23. Web Application OTP/Radius Server Redirect to CAS' Single Sign-on Portal Authentication Request (RADIUS) Web Access
  • 25. Thank you!! Giuseppe “Gippa” Paternò Visiting Researcher Trinity College Dublin paternog@cs.tcd.ie http://www.scss.tcd.ie/Giuseppe.Paterno/ http://www.gpaterno.com/