SlideShare una empresa de Scribd logo
1 de 21
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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
 

Destacado

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
 

Destacado (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 a 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 a 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
 

Último

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 

Último (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

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