SlideShare a Scribd company logo
1 of 21
Download to read offline
Security Reloaded




                                         VisualWorks Security
                                         New Generation


Martin Kobetic
Cincom Smalltalk Engineering
STIC 2012
What is Security?
Where?
* good security is invisible.
* presents itself when something is wrong.
* quickly spreading everywhere

How?
* Usually lurks at the bottom of technology stacks
    WWW, e-mail, file transfer, remote shell, ...
    HTTPS, SMTPS, POP3S, IMAPS,...
    SSL/TLS, SSH, X.509, PKCSx,....
    AES, RC4, SHA, MD5, ....
What's new?
cryptographic primitives (Xtreams-Crypto)

* open to external cryptographic toolkits
    MS Windows - CNG/BCrypt (Vista and later)
    Others - libcrypto (OpenSSL)
    extendable to other toolkits (e.g. certified, hardware backed, ...)
* new streaming hash and cipher APIs
    better performance and scalability
* new public key APIs
    focused around key types rather than algorithms
* new algorithms - library dependent
    e.g. SHA512
What's new?
PKCS5 - password based encryption/signing
   no API changes

PKCS8 - secure private key storage/transport
   minor changes dues to new public key APIs

X509 - public key certificates
   new signing API, SHA-2 support

SSL/TLS - secure sockets
    * complete overhaul and update
    * version support SSL3.0, TLS 1.0 - 1.2
    * new algorithms AES, SHA-2
    * flexible session management
    * pluggable certificate/key management
Hashes - Old
hello := 'Hello' asByteArrayEncoding: #ascii.
(SHA hash: hello) asHexString.

buffer := ByteArray new: 16384.
hash := MD5 new.
file := (ObjectMemory imageFilename
                 withEncoding: #binary) readStream.
[     [    [ file atEnd ] whileFalse: [ | read |
                 read :=
                      file nextAvailable: buffer size
                            into: buffer
                            startingAt: 1.
                 hash updateWith: buffer from: 1 to: read ].
      ] ensure: [ file close ].
] timeToRun.
hash digest asHexString.
Hashes - New
file := ObjectMemory imageFilename reading.
sha := file hashing: 'SHA512'.
[ nil writing write: sha ] timeToRun.
sha close.
sha digest asHexString.

(nil writing hashing: 'MD5')
     write: hello;
     close;
     digest
Ciphers - Old
message := 'Hello World!' asByteArrayEncoding: #ascii.
key := 'Open Sesame!!!!!' asByteArrayEncoding: #ascii.

((ARC4 key: key) encrypt: message) asHexString.

cipher := AES key: key.

cipher := CipherBlockChaining on: cipher.
iv := ByteArray new: 16 withAll: 1.
cipher setIV: iv.

cipher := BlockPadding on: cipher.
(cipher encrypt: message) asHexString
Ciphers - New
cipher := 'vault' asFilename writing
               encrypting: 'AES'
               mode: 'CBC'
               key: key
               iv: iv.
padded := cipher closing: [ | pad |
               pad := iv size - (padded position  iv size).
               padded write: pad from: pad repeating.
               cipher close ].
hash := padded compressing hashing: 'SHA1'.
file := ObjectMemory imageFilename reading.
[ hash write: file; close ] ensure: [ file close ].
hash digest asHexString
Public Key - Old
message := 'Hello World!' asByteArrayEncoding: #ascii.

keys := RSAKeyGenerator keySize: 1024.
keys publicKey.

rsa := RSA new privateKey: keys privateKey.
rsa useMD5.
sig := rsa sign: message.

rsa publicKey: keys publicKey.
rsa verify: sig of: message
Public Key - New
digest := (message reading hashing: 'SHA1')
             -= 0; close; digest.

pri := PrivateKey RSALength: 2048.
pub := pri asPublicKey.
[    sig := pri sign: digest hash: 'SHA1' padding: 'PKCS1'
] ensure: [ pri release ].

[    pub verify: sig of: digest hash: 'SHA1' padding: 'PKCS1'
] ensure: [ pub release ]
PKCS8 - Private Key Storage
bytes := ByteArray new readWriteStream.
password := 'Open Sesame' asByteArrayEncoding: #ascii.
pri := PrivateKey RSALength: 2048.
[    pri asPKCS8Key writeOn: bytes password: password
] ensure: [ pri release ].
bytes := bytes contents.

pri := PKCS8 readKeyFrom: bytes readStream password: password.
pri := pri getKey.
pri release.
X509 Certificates
pri := PrivateKey RSALength: 2048.
pub := pri asPublicKey.
name := Name new CN: 'STIC 2012'; yourself.
certificate := Certificate new
     serialNumber: 1000;
     issuer: name;
     subject: name;
     notBefore: Date today;
     notAfter: (Date today + 100 days);
     publicKey: pub asX509Key;
     forKeyExchange;
     yourself.
certificate signUsing: pri hash: 'SHA1' padding: 'PKCS1'.
pub release.
certificate publicKey getKey
TLS Client
LoggingTool open.
'https://www.google.com' asURI get.

socket := ('www.google.com' asIPv4: 443) connect.
context := TLSContext newClientWithDefaults.
connection := context newConnection: socket.
connection when: TLSAnnouncement do: [ :m |
     Transcript cr; print: m; flush ].
connection connect: [ :cert | cert inspect. true ].
stream := connection readAppendStream.
(HttpRequest get: 'https://www.google.com') writeOn: stream.
stream flush.
HttpResponse readFrom: stream.
stream close. connection close. socket close.
context release
TLS Server
certificates := TLSCertificateStore newWithDefaults.
certificates certificate: (Array with: certificate) key: pri.
context := TLSContext newServerWithDefaults.
context certificates: certificates.
server := (WebAdaptorConfiguration new
     addExecutor: (WebFileServer prefix: #('files') directory: '.' asFilename);
     addExecutor: WebEcho new;
     transport: (HTTPSTransportConfiguration new
                     serverContext: context;
                     marshaler: WebMarshalerConfiguration new )
) newAtPort: 4433.
server when: #addingServerConnection:in: do: [ :c :a |
     Transcript cr; print: c ].
server start.
server stop.
context release. certificates release.
TLS Context
certificates - TLSCertificateStore
* certificate management and processing
* public/private key management and operations

sessions - TLSSessionCache
* TLS session management

suites - TLSCipherSuite
* bulk encryption/hashing setup
* key exchange setup

compressions - TLSCompression
* compression setup
SSH Client
home := '$(HOME)' asLogicalFileSpecification asFilename.
user := home tail.
keys := SSH2Keys fromUser: home.
configuration := SSH2Configuration new keys: keys.
socket := ('localhost' asIPv4: 22) connect.
client := configuration newClientConnectionOn: socket.
client when: SSH2Announcement do: [ :m | Transcript cr; print: m ].
client connect: user.
session := client session.
session exec: 'ls -l'.
session put: 'ssh' to: '/dev/shm/'.
session close.
client close.
configuration release
SSH Client
home := '$(HOME)' asLogicalFileSpecification asFilename.
user := home tail.
keys := SSH2Keys fromUser: home.
configuration := SSH2Configuration new keys: keys.
socket := ('localhost' asIPv4: 22) connect.
client := configuration newClientConnectionOn: socket.
client when: SSH2Announcement do: [ :m | Transcript cr; print: m ].
client connect: user.
tunnel := client tunnelTo: 'localhost' port: 5555.
tunnel writing write: 10000 from: 42 repeating; close.
tunnel close.
client close.
configuration release
SSH Server
keys := SSH2KeysTest sampleKeys.
configuration := SSH2Configuration new keys: keys.
listener := ('localhost' asIPv4: 2222) listen.
[ socket := listener accept ] ensure: [ listener close ].
server := configuration newServerConnectionOn: socket.
server when: SSH2Announcement do: [ :m | Transcript cr; print: m ].
server accept.
server waitForDisconnect.
queue := server openQueueAt: 'test:6666'.
worker := [ tunnel := queue next.
     [ nil writing write: tunnel reading ] ensure: [ tunnel close ] ] fork.
server closeQueue: queue.
server close.
configuration release
To Do
crypto fallback
    BCrypt: Vista and later only, poor support for DSA/DH
    libcrypto: < 1.0.0 no public key crypto (OSX, older Linux releases)

TLS
      renegotiation_info
      smarter client session management
      client authentication
      DHE_RSA key exchange
      elliptic crypto (ECDH/ECDSA)
Summary
* more implementation options
* more algorithms
* highly extensible
* significantly faster
* up to date SSL/TLS support
* capable of handling server side load
Contact Info

Star Team (Smalltalk Strategic Resources)

sfortman@cincom.com        Smalltalk Director
athomas@cincom.com         Smalltalk Product Manager
jjordan@cincom.com         Smalltalk Marketing Manager

http://www.cincomsmalltalk.com




(c) 2012 Cincom System Inc, All Rights Reserved, Developed in Canada

More Related Content

What's hot

Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Chickens & Eggs: Managing secrets in AWS with Hashicorp VaultChickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Chickens & Eggs: Managing secrets in AWS with Hashicorp VaultJeff Horwitz
 
HashiCorp Vault Plugin Infrastructure
HashiCorp Vault Plugin InfrastructureHashiCorp Vault Plugin Infrastructure
HashiCorp Vault Plugin InfrastructureNicolas Corrarello
 
Vault - Secret and Key Management
Vault - Secret and Key ManagementVault - Secret and Key Management
Vault - Secret and Key ManagementAnthony Ikeda
 
Zi nginx conf_2015
Zi nginx conf_2015Zi nginx conf_2015
Zi nginx conf_2015Zi Lin
 
Cryptography for Absolute Beginners (May 2019)
Cryptography for Absolute Beginners (May 2019)Cryptography for Absolute Beginners (May 2019)
Cryptography for Absolute Beginners (May 2019)Svetlin Nakov
 
Using Vault to decouple MySQL Secrets
Using Vault to decouple MySQL SecretsUsing Vault to decouple MySQL Secrets
Using Vault to decouple MySQL SecretsDerek Downey
 
HashiCorp Vault Workshop:幫 Credentials 找個窩
HashiCorp Vault Workshop:幫 Credentials 找個窩HashiCorp Vault Workshop:幫 Credentials 找個窩
HashiCorp Vault Workshop:幫 Credentials 找個窩smalltown
 
Container Security via Monitoring and Orchestration - Container Security Summit
Container Security via Monitoring and Orchestration - Container Security SummitContainer Security via Monitoring and Orchestration - Container Security Summit
Container Security via Monitoring and Orchestration - Container Security SummitDavid Timothy Strauss
 
Blockchain Cryptography for Developers (Nakov @ BGWebSummit 2018)
Blockchain Cryptography for Developers (Nakov @ BGWebSummit 2018)Blockchain Cryptography for Developers (Nakov @ BGWebSummit 2018)
Blockchain Cryptography for Developers (Nakov @ BGWebSummit 2018)Svetlin Nakov
 
9 password security
9   password security9   password security
9 password securitydrewz lin
 
SCaLE 2016 - syslog-ng: From Raw Data to Big Data
SCaLE 2016 - syslog-ng: From Raw Data to Big DataSCaLE 2016 - syslog-ng: From Raw Data to Big Data
SCaLE 2016 - syslog-ng: From Raw Data to Big DataBalaBit
 
Cryptography for Java Developers: Nakov jProfessionals (Jan 2019)
Cryptography for Java Developers: Nakov jProfessionals (Jan 2019)Cryptography for Java Developers: Nakov jProfessionals (Jan 2019)
Cryptography for Java Developers: Nakov jProfessionals (Jan 2019)Svetlin Nakov
 
BlueHat v17 || Detecting Compromise on Windows Endpoints with Osquery
BlueHat v17 || Detecting Compromise on Windows Endpoints with Osquery BlueHat v17 || Detecting Compromise on Windows Endpoints with Osquery
BlueHat v17 || Detecting Compromise on Windows Endpoints with Osquery BlueHat Security Conference
 
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)Svetlin Nakov
 
Integration of neutron, nova and designate how to use it and how to configur...
Integration of neutron, nova and designate  how to use it and how to configur...Integration of neutron, nova and designate  how to use it and how to configur...
Integration of neutron, nova and designate how to use it and how to configur...Miguel Lavalle
 

What's hot (20)

Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Chickens & Eggs: Managing secrets in AWS with Hashicorp VaultChickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
 
HashiCorp Vault Plugin Infrastructure
HashiCorp Vault Plugin InfrastructureHashiCorp Vault Plugin Infrastructure
HashiCorp Vault Plugin Infrastructure
 
Vault - Secret and Key Management
Vault - Secret and Key ManagementVault - Secret and Key Management
Vault - Secret and Key Management
 
Openssl
OpensslOpenssl
Openssl
 
Zi nginx conf_2015
Zi nginx conf_2015Zi nginx conf_2015
Zi nginx conf_2015
 
Cryptography for Absolute Beginners (May 2019)
Cryptography for Absolute Beginners (May 2019)Cryptography for Absolute Beginners (May 2019)
Cryptography for Absolute Beginners (May 2019)
 
Using Vault to decouple MySQL Secrets
Using Vault to decouple MySQL SecretsUsing Vault to decouple MySQL Secrets
Using Vault to decouple MySQL Secrets
 
HashiCorp Vault Workshop:幫 Credentials 找個窩
HashiCorp Vault Workshop:幫 Credentials 找個窩HashiCorp Vault Workshop:幫 Credentials 找個窩
HashiCorp Vault Workshop:幫 Credentials 找個窩
 
Da APK al Golden Ticket
Da APK al Golden TicketDa APK al Golden Ticket
Da APK al Golden Ticket
 
Docker and Fargate
Docker and FargateDocker and Fargate
Docker and Fargate
 
Container Security via Monitoring and Orchestration - Container Security Summit
Container Security via Monitoring and Orchestration - Container Security SummitContainer Security via Monitoring and Orchestration - Container Security Summit
Container Security via Monitoring and Orchestration - Container Security Summit
 
Blockchain Cryptography for Developers (Nakov @ BGWebSummit 2018)
Blockchain Cryptography for Developers (Nakov @ BGWebSummit 2018)Blockchain Cryptography for Developers (Nakov @ BGWebSummit 2018)
Blockchain Cryptography for Developers (Nakov @ BGWebSummit 2018)
 
9 password security
9   password security9   password security
9 password security
 
SCaLE 2016 - syslog-ng: From Raw Data to Big Data
SCaLE 2016 - syslog-ng: From Raw Data to Big DataSCaLE 2016 - syslog-ng: From Raw Data to Big Data
SCaLE 2016 - syslog-ng: From Raw Data to Big Data
 
Cryptography for Java Developers: Nakov jProfessionals (Jan 2019)
Cryptography for Java Developers: Nakov jProfessionals (Jan 2019)Cryptography for Java Developers: Nakov jProfessionals (Jan 2019)
Cryptography for Java Developers: Nakov jProfessionals (Jan 2019)
 
BlueHat v17 || Detecting Compromise on Windows Endpoints with Osquery
BlueHat v17 || Detecting Compromise on Windows Endpoints with Osquery BlueHat v17 || Detecting Compromise on Windows Endpoints with Osquery
BlueHat v17 || Detecting Compromise on Windows Endpoints with Osquery
 
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
 
Integration of neutron, nova and designate how to use it and how to configur...
Integration of neutron, nova and designate  how to use it and how to configur...Integration of neutron, nova and designate  how to use it and how to configur...
Integration of neutron, nova and designate how to use it and how to configur...
 
Introducing Vault
Introducing VaultIntroducing Vault
Introducing Vault
 
ION Bucharest - DANE-DNSSEC-TLS
ION Bucharest - DANE-DNSSEC-TLSION Bucharest - DANE-DNSSEC-TLS
ION Bucharest - DANE-DNSSEC-TLS
 

Viewers also liked

What’s New In Cincom Smalltalk
What’s New In Cincom SmalltalkWhat’s New In Cincom Smalltalk
What’s New In Cincom SmalltalkESUG
 
WordCamp Utah 2010 Presentation
WordCamp Utah 2010 PresentationWordCamp Utah 2010 Presentation
WordCamp Utah 2010 PresentationJ.R. Farr
 
Maycafotos2 eviita
Maycafotos2 eviitaMaycafotos2 eviita
Maycafotos2 eviitaangelinayoli
 
Maycafotos2 eviita
Maycafotos2 eviitaMaycafotos2 eviita
Maycafotos2 eviitaangelinayoli
 
Protecting Students On and Off Campus- Expanding The Jeanne Clery Act
Protecting Students On and Off Campus- Expanding The Jeanne Clery Act  Protecting Students On and Off Campus- Expanding The Jeanne Clery Act
Protecting Students On and Off Campus- Expanding The Jeanne Clery Act Mzz Paris Mcbeam
 
Cryptography and SSL in Smalltalk - StS 2003
Cryptography and SSL in Smalltalk - StS 2003Cryptography and SSL in Smalltalk - StS 2003
Cryptography and SSL in Smalltalk - StS 2003Martin Kobetic
 
Secure Communications with VisualWorks - CSTUC 2006
Secure Communications with VisualWorks - CSTUC 2006Secure Communications with VisualWorks - CSTUC 2006
Secure Communications with VisualWorks - CSTUC 2006Martin Kobetic
 
Cryptography for Smalltalkers 2 - ESUG 2006
Cryptography for Smalltalkers 2 - ESUG 2006Cryptography for Smalltalkers 2 - ESUG 2006
Cryptography for Smalltalkers 2 - ESUG 2006Martin Kobetic
 
Opentalk at Large - StS 2005
Opentalk at Large - StS 2005Opentalk at Large - StS 2005
Opentalk at Large - StS 2005Martin Kobetic
 
CVST - Smalltalk Solutions 2001
CVST - Smalltalk Solutions 2001CVST - Smalltalk Solutions 2001
CVST - Smalltalk Solutions 2001Martin Kobetic
 
Cryptography for Smalltalkers - ESUG 2004
Cryptography for Smalltalkers - ESUG 2004Cryptography for Smalltalkers - ESUG 2004
Cryptography for Smalltalkers - ESUG 2004Martin Kobetic
 
1 overview pkg-pkb versi 5 12 mei 12
1 overview pkg-pkb versi 5 12 mei 121 overview pkg-pkb versi 5 12 mei 12
1 overview pkg-pkb versi 5 12 mei 12Ruhiyat Spd
 
What Would You Like To Grow... Community Values
What Would You Like To Grow... Community ValuesWhat Would You Like To Grow... Community Values
What Would You Like To Grow... Community ValuesPwC Australia
 
What Can Private Businesses Do to Attract and Retain Talent?
What Can Private Businesses Do to Attract and Retain Talent?What Can Private Businesses Do to Attract and Retain Talent?
What Can Private Businesses Do to Attract and Retain Talent?PwC Australia
 
La photographie est un art
La photographie est un artLa photographie est un art
La photographie est un artOlivier Beuvelet
 
L'institution culturelle de la photographie HP3
L'institution culturelle de la photographie HP3L'institution culturelle de la photographie HP3
L'institution culturelle de la photographie HP3Olivier Beuvelet
 
A More Human Approach to Human Capital
A More Human Approach to Human CapitalA More Human Approach to Human Capital
A More Human Approach to Human CapitalGeordie McClelland
 

Viewers also liked (20)

What’s New In Cincom Smalltalk
What’s New In Cincom SmalltalkWhat’s New In Cincom Smalltalk
What’s New In Cincom Smalltalk
 
WordCamp Utah 2010 Presentation
WordCamp Utah 2010 PresentationWordCamp Utah 2010 Presentation
WordCamp Utah 2010 Presentation
 
Maycafotos2 eviita
Maycafotos2 eviitaMaycafotos2 eviita
Maycafotos2 eviita
 
Maycafotos2 eviita
Maycafotos2 eviitaMaycafotos2 eviita
Maycafotos2 eviita
 
Xtreams - ESUG 2010
Xtreams - ESUG 2010Xtreams - ESUG 2010
Xtreams - ESUG 2010
 
Protecting Students On and Off Campus- Expanding The Jeanne Clery Act
Protecting Students On and Off Campus- Expanding The Jeanne Clery Act  Protecting Students On and Off Campus- Expanding The Jeanne Clery Act
Protecting Students On and Off Campus- Expanding The Jeanne Clery Act
 
Jane Austen Can Get You A Job
Jane Austen Can Get You A JobJane Austen Can Get You A Job
Jane Austen Can Get You A Job
 
Pts
PtsPts
Pts
 
Cryptography and SSL in Smalltalk - StS 2003
Cryptography and SSL in Smalltalk - StS 2003Cryptography and SSL in Smalltalk - StS 2003
Cryptography and SSL in Smalltalk - StS 2003
 
Secure Communications with VisualWorks - CSTUC 2006
Secure Communications with VisualWorks - CSTUC 2006Secure Communications with VisualWorks - CSTUC 2006
Secure Communications with VisualWorks - CSTUC 2006
 
Cryptography for Smalltalkers 2 - ESUG 2006
Cryptography for Smalltalkers 2 - ESUG 2006Cryptography for Smalltalkers 2 - ESUG 2006
Cryptography for Smalltalkers 2 - ESUG 2006
 
Opentalk at Large - StS 2005
Opentalk at Large - StS 2005Opentalk at Large - StS 2005
Opentalk at Large - StS 2005
 
CVST - Smalltalk Solutions 2001
CVST - Smalltalk Solutions 2001CVST - Smalltalk Solutions 2001
CVST - Smalltalk Solutions 2001
 
Cryptography for Smalltalkers - ESUG 2004
Cryptography for Smalltalkers - ESUG 2004Cryptography for Smalltalkers - ESUG 2004
Cryptography for Smalltalkers - ESUG 2004
 
1 overview pkg-pkb versi 5 12 mei 12
1 overview pkg-pkb versi 5 12 mei 121 overview pkg-pkb versi 5 12 mei 12
1 overview pkg-pkb versi 5 12 mei 12
 
What Would You Like To Grow... Community Values
What Would You Like To Grow... Community ValuesWhat Would You Like To Grow... Community Values
What Would You Like To Grow... Community Values
 
What Can Private Businesses Do to Attract and Retain Talent?
What Can Private Businesses Do to Attract and Retain Talent?What Can Private Businesses Do to Attract and Retain Talent?
What Can Private Businesses Do to Attract and Retain Talent?
 
La photographie est un art
La photographie est un artLa photographie est un art
La photographie est un art
 
L'institution culturelle de la photographie HP3
L'institution culturelle de la photographie HP3L'institution culturelle de la photographie HP3
L'institution culturelle de la photographie HP3
 
A More Human Approach to Human Capital
A More Human Approach to Human CapitalA More Human Approach to Human Capital
A More Human Approach to Human Capital
 

Similar to VisualWorks Security Reloaded - STIC 2012

Seattle C* Meetup: Hardening cassandra for compliance or paranoia
Seattle C* Meetup: Hardening cassandra for compliance or paranoiaSeattle C* Meetup: Hardening cassandra for compliance or paranoia
Seattle C* Meetup: Hardening cassandra for compliance or paranoiazznate
 
Hardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoiaHardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoiazznate
 
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).DataStax Academy
 
NGiNX, VHOSTS & SSL (let's encrypt)
NGiNX, VHOSTS & SSL (let's encrypt)NGiNX, VHOSTS & SSL (let's encrypt)
NGiNX, VHOSTS & SSL (let's encrypt)Marcel Cattaneo
 
Making the secure communication between Server and Client with https protocol
Making the secure communication between Server and Client with https protocolMaking the secure communication between Server and Client with https protocol
Making the secure communication between Server and Client with https protocolArmenuhi Abramyan
 
Introduction to InSpec and 1.0 release update
Introduction to InSpec and 1.0 release updateIntroduction to InSpec and 1.0 release update
Introduction to InSpec and 1.0 release updateAlex Pop
 
Information security programming in ruby
Information security programming in rubyInformation security programming in ruby
Information security programming in rubyHiroshi Nakamura
 
Computer network (4)
Computer network (4)Computer network (4)
Computer network (4)NYversity
 
Random musings on SSL/TLS configuration
Random musings on SSL/TLS configurationRandom musings on SSL/TLS configuration
Random musings on SSL/TLS configurationextremeunix
 
OpenSSL programming (still somewhat initial version)
OpenSSL programming (still somewhat initial version)OpenSSL programming (still somewhat initial version)
OpenSSL programming (still somewhat initial version)Shteryana Shopova
 
Hadoop Security Now and Future
Hadoop Security Now and FutureHadoop Security Now and Future
Hadoop Security Now and Futuretcloudcomputing-tw
 
TLS/SSL Protocol Design
TLS/SSL Protocol DesignTLS/SSL Protocol Design
TLS/SSL Protocol DesignNate Lawson
 
Cryptography with Zend Framework
Cryptography with Zend FrameworkCryptography with Zend Framework
Cryptography with Zend FrameworkEnrico Zimuel
 
Cryptography for Smalltalkers 2
Cryptography for Smalltalkers 2Cryptography for Smalltalkers 2
Cryptography for Smalltalkers 2ESUG
 

Similar to VisualWorks Security Reloaded - STIC 2012 (20)

Rhel5
Rhel5Rhel5
Rhel5
 
Seattle C* Meetup: Hardening cassandra for compliance or paranoia
Seattle C* Meetup: Hardening cassandra for compliance or paranoiaSeattle C* Meetup: Hardening cassandra for compliance or paranoia
Seattle C* Meetup: Hardening cassandra for compliance or paranoia
 
Django cryptography
Django cryptographyDjango cryptography
Django cryptography
 
Hardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoiaHardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoia
 
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
 
FreeBSD and Hardening Web Server
FreeBSD and Hardening Web ServerFreeBSD and Hardening Web Server
FreeBSD and Hardening Web Server
 
NGiNX, VHOSTS & SSL (let's encrypt)
NGiNX, VHOSTS & SSL (let's encrypt)NGiNX, VHOSTS & SSL (let's encrypt)
NGiNX, VHOSTS & SSL (let's encrypt)
 
Making the secure communication between Server and Client with https protocol
Making the secure communication between Server and Client with https protocolMaking the secure communication between Server and Client with https protocol
Making the secure communication between Server and Client with https protocol
 
Introduction to InSpec and 1.0 release update
Introduction to InSpec and 1.0 release updateIntroduction to InSpec and 1.0 release update
Introduction to InSpec and 1.0 release update
 
Information security programming in ruby
Information security programming in rubyInformation security programming in ruby
Information security programming in ruby
 
Computer network (4)
Computer network (4)Computer network (4)
Computer network (4)
 
SSL.ppt
SSL.pptSSL.ppt
SSL.ppt
 
Random musings on SSL/TLS configuration
Random musings on SSL/TLS configurationRandom musings on SSL/TLS configuration
Random musings on SSL/TLS configuration
 
OpenSSL programming (still somewhat initial version)
OpenSSL programming (still somewhat initial version)OpenSSL programming (still somewhat initial version)
OpenSSL programming (still somewhat initial version)
 
Hadoop Security Now and Future
Hadoop Security Now and FutureHadoop Security Now and Future
Hadoop Security Now and Future
 
Intro to SSH
Intro to SSHIntro to SSH
Intro to SSH
 
TLS/SSL Protocol Design
TLS/SSL Protocol DesignTLS/SSL Protocol Design
TLS/SSL Protocol Design
 
Cryptography with Zend Framework
Cryptography with Zend FrameworkCryptography with Zend Framework
Cryptography with Zend Framework
 
Cryptography for Smalltalkers 2
Cryptography for Smalltalkers 2Cryptography for Smalltalkers 2
Cryptography for Smalltalkers 2
 
Python Cryptography & Security
Python Cryptography & SecurityPython Cryptography & Security
Python Cryptography & Security
 

Recently uploaded

Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Nikki Chapple
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...amber724300
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialJoão Esperancinha
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sectoritnewsafrica
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFMichael Gough
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 

Recently uploaded (20)

Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorial
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
4. Cobus Valentine- Cybersecurity Threats and Solutions for the Public Sector
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDF
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 

VisualWorks Security Reloaded - STIC 2012

  • 1. Security Reloaded VisualWorks Security New Generation Martin Kobetic Cincom Smalltalk Engineering STIC 2012
  • 2. What is Security? Where? * good security is invisible. * presents itself when something is wrong. * quickly spreading everywhere How? * Usually lurks at the bottom of technology stacks WWW, e-mail, file transfer, remote shell, ... HTTPS, SMTPS, POP3S, IMAPS,... SSL/TLS, SSH, X.509, PKCSx,.... AES, RC4, SHA, MD5, ....
  • 3. What's new? cryptographic primitives (Xtreams-Crypto) * open to external cryptographic toolkits MS Windows - CNG/BCrypt (Vista and later) Others - libcrypto (OpenSSL) extendable to other toolkits (e.g. certified, hardware backed, ...) * new streaming hash and cipher APIs better performance and scalability * new public key APIs focused around key types rather than algorithms * new algorithms - library dependent e.g. SHA512
  • 4. What's new? PKCS5 - password based encryption/signing no API changes PKCS8 - secure private key storage/transport minor changes dues to new public key APIs X509 - public key certificates new signing API, SHA-2 support SSL/TLS - secure sockets * complete overhaul and update * version support SSL3.0, TLS 1.0 - 1.2 * new algorithms AES, SHA-2 * flexible session management * pluggable certificate/key management
  • 5. Hashes - Old hello := 'Hello' asByteArrayEncoding: #ascii. (SHA hash: hello) asHexString. buffer := ByteArray new: 16384. hash := MD5 new. file := (ObjectMemory imageFilename withEncoding: #binary) readStream. [ [ [ file atEnd ] whileFalse: [ | read | read := file nextAvailable: buffer size into: buffer startingAt: 1. hash updateWith: buffer from: 1 to: read ]. ] ensure: [ file close ]. ] timeToRun. hash digest asHexString.
  • 6. Hashes - New file := ObjectMemory imageFilename reading. sha := file hashing: 'SHA512'. [ nil writing write: sha ] timeToRun. sha close. sha digest asHexString. (nil writing hashing: 'MD5') write: hello; close; digest
  • 7. Ciphers - Old message := 'Hello World!' asByteArrayEncoding: #ascii. key := 'Open Sesame!!!!!' asByteArrayEncoding: #ascii. ((ARC4 key: key) encrypt: message) asHexString. cipher := AES key: key. cipher := CipherBlockChaining on: cipher. iv := ByteArray new: 16 withAll: 1. cipher setIV: iv. cipher := BlockPadding on: cipher. (cipher encrypt: message) asHexString
  • 8. Ciphers - New cipher := 'vault' asFilename writing encrypting: 'AES' mode: 'CBC' key: key iv: iv. padded := cipher closing: [ | pad | pad := iv size - (padded position iv size). padded write: pad from: pad repeating. cipher close ]. hash := padded compressing hashing: 'SHA1'. file := ObjectMemory imageFilename reading. [ hash write: file; close ] ensure: [ file close ]. hash digest asHexString
  • 9. Public Key - Old message := 'Hello World!' asByteArrayEncoding: #ascii. keys := RSAKeyGenerator keySize: 1024. keys publicKey. rsa := RSA new privateKey: keys privateKey. rsa useMD5. sig := rsa sign: message. rsa publicKey: keys publicKey. rsa verify: sig of: message
  • 10. Public Key - New digest := (message reading hashing: 'SHA1') -= 0; close; digest. pri := PrivateKey RSALength: 2048. pub := pri asPublicKey. [ sig := pri sign: digest hash: 'SHA1' padding: 'PKCS1' ] ensure: [ pri release ]. [ pub verify: sig of: digest hash: 'SHA1' padding: 'PKCS1' ] ensure: [ pub release ]
  • 11. PKCS8 - Private Key Storage bytes := ByteArray new readWriteStream. password := 'Open Sesame' asByteArrayEncoding: #ascii. pri := PrivateKey RSALength: 2048. [ pri asPKCS8Key writeOn: bytes password: password ] ensure: [ pri release ]. bytes := bytes contents. pri := PKCS8 readKeyFrom: bytes readStream password: password. pri := pri getKey. pri release.
  • 12. X509 Certificates pri := PrivateKey RSALength: 2048. pub := pri asPublicKey. name := Name new CN: 'STIC 2012'; yourself. certificate := Certificate new serialNumber: 1000; issuer: name; subject: name; notBefore: Date today; notAfter: (Date today + 100 days); publicKey: pub asX509Key; forKeyExchange; yourself. certificate signUsing: pri hash: 'SHA1' padding: 'PKCS1'. pub release. certificate publicKey getKey
  • 13. TLS Client LoggingTool open. 'https://www.google.com' asURI get. socket := ('www.google.com' asIPv4: 443) connect. context := TLSContext newClientWithDefaults. connection := context newConnection: socket. connection when: TLSAnnouncement do: [ :m | Transcript cr; print: m; flush ]. connection connect: [ :cert | cert inspect. true ]. stream := connection readAppendStream. (HttpRequest get: 'https://www.google.com') writeOn: stream. stream flush. HttpResponse readFrom: stream. stream close. connection close. socket close. context release
  • 14. TLS Server certificates := TLSCertificateStore newWithDefaults. certificates certificate: (Array with: certificate) key: pri. context := TLSContext newServerWithDefaults. context certificates: certificates. server := (WebAdaptorConfiguration new addExecutor: (WebFileServer prefix: #('files') directory: '.' asFilename); addExecutor: WebEcho new; transport: (HTTPSTransportConfiguration new serverContext: context; marshaler: WebMarshalerConfiguration new ) ) newAtPort: 4433. server when: #addingServerConnection:in: do: [ :c :a | Transcript cr; print: c ]. server start. server stop. context release. certificates release.
  • 15. TLS Context certificates - TLSCertificateStore * certificate management and processing * public/private key management and operations sessions - TLSSessionCache * TLS session management suites - TLSCipherSuite * bulk encryption/hashing setup * key exchange setup compressions - TLSCompression * compression setup
  • 16. SSH Client home := '$(HOME)' asLogicalFileSpecification asFilename. user := home tail. keys := SSH2Keys fromUser: home. configuration := SSH2Configuration new keys: keys. socket := ('localhost' asIPv4: 22) connect. client := configuration newClientConnectionOn: socket. client when: SSH2Announcement do: [ :m | Transcript cr; print: m ]. client connect: user. session := client session. session exec: 'ls -l'. session put: 'ssh' to: '/dev/shm/'. session close. client close. configuration release
  • 17. SSH Client home := '$(HOME)' asLogicalFileSpecification asFilename. user := home tail. keys := SSH2Keys fromUser: home. configuration := SSH2Configuration new keys: keys. socket := ('localhost' asIPv4: 22) connect. client := configuration newClientConnectionOn: socket. client when: SSH2Announcement do: [ :m | Transcript cr; print: m ]. client connect: user. tunnel := client tunnelTo: 'localhost' port: 5555. tunnel writing write: 10000 from: 42 repeating; close. tunnel close. client close. configuration release
  • 18. SSH Server keys := SSH2KeysTest sampleKeys. configuration := SSH2Configuration new keys: keys. listener := ('localhost' asIPv4: 2222) listen. [ socket := listener accept ] ensure: [ listener close ]. server := configuration newServerConnectionOn: socket. server when: SSH2Announcement do: [ :m | Transcript cr; print: m ]. server accept. server waitForDisconnect. queue := server openQueueAt: 'test:6666'. worker := [ tunnel := queue next. [ nil writing write: tunnel reading ] ensure: [ tunnel close ] ] fork. server closeQueue: queue. server close. configuration release
  • 19. To Do crypto fallback BCrypt: Vista and later only, poor support for DSA/DH libcrypto: < 1.0.0 no public key crypto (OSX, older Linux releases) TLS renegotiation_info smarter client session management client authentication DHE_RSA key exchange elliptic crypto (ECDH/ECDSA)
  • 20. Summary * more implementation options * more algorithms * highly extensible * significantly faster * up to date SSL/TLS support * capable of handling server side load
  • 21. Contact Info Star Team (Smalltalk Strategic Resources) sfortman@cincom.com Smalltalk Director athomas@cincom.com Smalltalk Product Manager jjordan@cincom.com Smalltalk Marketing Manager http://www.cincomsmalltalk.com (c) 2012 Cincom System Inc, All Rights Reserved, Developed in Canada