Top Banner
49

The Principles of Secure Development - Epicenter Dublin

Dec 24, 2014

Download

Technology

Security Ninja

The Principles of Secure Development by David Rook at the Epicenter Dublin conference in 2009.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: The Principles of Secure Development - Epicenter Dublin

���������

��� �������������������������������

�����������������

Page 2: The Principles of Secure Development - Epicenter Dublin

������

� ������������� ����������

� �������������������

� ����������� ���������������� �����

� ����������������������� ������ �������

Page 3: The Principles of Secure Development - Epicenter Dublin

�������������������������

�!����"���"���������#$%������������ &

� ��������� �� ���!�"�� �����������!���� ���#����!�#�� !�$#�%����������������������

� ���������&��'��()))*�����������'�*�*�+

� ��������������������������(������ ���������������� +

� �� �,������� ������,���-�$���

� .���� ������������� ���������������������(�����������-�/���!�� -������ ���+

Page 4: The Principles of Secure Development - Epicenter Dublin

� #�����������������-!�01������� �2

� �34���'�����!�5������� �2

667���� ��� ������ ���������8119�����811:�(�����+�����

�������34���'������(��������#;<��������+

#���������������������'���

#;<�����������=�����=>>)��*���*����*-�>���)>�� �>����������

Page 5: The Principles of Secure Development - Epicenter Dublin

#���������������������'���

Page 6: The Principles of Secure Development - Epicenter Dublin

$�����������������������������������������!��������������������������������������� �������*

��������������������������������!

������������ ������������� ������ �����������)� �����������!������������)������� �������� ���������)� ���������������� ������ �����*

��)��������� ������������������� ����������� �����=

Page 7: The Principles of Secure Development - Epicenter Dublin

�������������������( ���)���������������� ������ ��������������� �������+

� �����������������������

� ���������-������ ����� ��������������������� ������ �����

� ,�������������-��������)���������������

� �������� ������������ �)������������ �������

� ���������-������� ����)���������-������ ��

Page 8: The Principles of Secure Development - Epicenter Dublin

�������������������( ���)���������������� ������ ��������������� �������+

� ,�������)�����-�����������������������)��2

� ������������ ����������������������������)�����������

� ,�������������������-���������)�����������

� �������� �������������)� ������

� ��� ����� ����)���������-��������������

Page 9: The Principles of Secure Development - Epicenter Dublin

�������������������( ���)���������������� ������ ��������������� �������+

� ?���� ��������� ������ �����

� @, ������01

� ,�����%����������01

� � &�����8A

� @�����22

Page 10: The Principles of Secure Development - Epicenter Dublin

�������������������( ���)���������������� ������ ��������������� �������+

#�����������������-

��'������. �)�

?� ������.� ��<�������

����������4���-�

��������<����%��� ��-

����� ������������

�������?���-�����

#���������"�B�����.�-���

���������#�����������

����������������@�'����"��������

.�� ������"��������C"4� �����

���������#����-�����������-�

�34���'�����

#�����������-

������������� ����������

������������� ������������

�������.������� ���

��������� ��"�������4�����

��������������;� ������

.�� ����������������34�3��������������

.�� ���������������,�����-�����������

.�� ���������������@��#���������������

.�� ������#��������@���������)������������������?�����������

.�� ������#��� �$�����������#��# ����D�����<������������������D�������������

��������<�����-���<������-���@�����

������������������� ���-���������#������ �"������

.�� ���������������,�����-�����������

<����?����-������������4��

�������� ������#���

%���D#��������)��

<��������)����C���������������� �-��

C����������������� ��"�����;� ���

C��������������"����#����-������� -�����

# �����������������������������������������

C����������������� ��"�����;� ���

C��������������������

<������ �#��� ���.� ��&����������

<������ �#��� ���#������ �����������

Page 11: The Principles of Secure Development - Epicenter Dublin

�������������������( ���)���������������� ������ ��������������� �������+

� ?���� ��������� ������ �����

� @, ������01

� ,�����%����������01

� � &�����8A

� @�����22

� EF������������ ������-�������

Page 12: The Principles of Secure Development - Epicenter Dublin

(����)������������

� ����������� �����������������������������������

� ���������-������ ����� ������)���)���������������

� ���� ��������G���������-�����������

� #������ ������ ���������������������� �������

� "�� ��������'������������������ ��������2

Page 13: The Principles of Secure Development - Epicenter Dublin

*���������������������������������

� H�������������������� ��(H���+

� ����������� ������������ ��� ���������

� 4��-��-�>� �����>.����)�������������

� ��� ����������������'��������������� ������ �����

� ?�������������)��������-�������"@��������������������-2

Page 14: The Principles of Secure Development - Epicenter Dublin

� ������;� ������

� @������;� ������

� <����%��� ��-

� ����������������� ����������

� �������?���-�����

� �������#�����������

� �����������-�

� �������"������� �����

��� �������������������������������

Page 15: The Principles of Secure Development - Epicenter Dublin

��� �������������������������������

� ������;� ������

� ������������������������������������ ������������������

� #��������-��G� ���� ���������������������(�������������/�+

� .������� �!�������������������������������=�I�J08!0KLM

� C���)���� �����-������ �������)���������� �

� � �� �����-��������������������������� �� ����������

� � �� ��������� �!���� ����-����- ��B����=

�*��� ��� (�������*B���(��N��+!?������*B���"�� �������(�����++

Page 16: The Principles of Secure Development - Epicenter Dublin

��� �������������������������������

� @������;� ������

� ������������������������������������ �����������������

� C����������)�����(�*�*������C"4+������������� ��������

� #���������������������������-������������N������������

� ������������-�����������������=

)))*����� �����*��>���*��� 2���FO������P� ���(�������*���+O>������P

������=

���F76#������76<� ���789�������*���78:76#>������76<

Page 17: The Principles of Secure Development - Epicenter Dublin

��� �������������������������������

� <����%��� ��-

� <������������������)� ������������������!������������E

� #������>������������ ���������������������G������ ������

� %��� ���������������������� �!�������������������-������

� &���������� ��-�F����������� ���-�

����������� ������������ ��

������������������

������������ �����������

������������������ �!"����"#$ !$�

%��!$&"�����%"�'� (!�&)"� ���

Page 18: The Principles of Secure Development - Epicenter Dublin

��� �������������������������������

� ����������������� ����������

� <�������� ��������������������������������������������

� @�������� ������)� ��� ���������������

� &�����������������/��� ������������ ������ �-������ ����

� ��� ����������-�����)������������-�������������

� <������ Q ����������!�������� ��������������������(# ��#% 2+

� ��G���� ������� ���������������� ��������(������������ �+

Page 19: The Principles of Secure Development - Epicenter Dublin

��� �������������������������������

� �������?���-�����

� C����������-���������������������!������������D����

� R���������������������������������G� ����������������������

� ��������G���������������������� ���������� ��

� &�������� ������)�������������-�����!����)� ����

� ���������������G��)���������������(�*�*���4E+

� ����������)��� �����������������������(�*�*���������������+

Page 20: The Principles of Secure Development - Epicenter Dublin

��� �������������������������������

� �������#�����������

� ������������(�*�*�##��!�����)���!���������G�+�����������

� ��)����� ������!���G�������������)�

� ��G�������������������������������(�*�*���4�8+

� ��G��'����������4>�4����� -����-��!������������������E

� ����������������-�����������������������������������-�

Page 21: The Principles of Secure Development - Epicenter Dublin

��� �������������������������������

� �����������-�

� ������������(�*�*�##��!�����)���!���������G�+�)���������

� ��)����� ������!���G�������������)�

� ��G�������������������������������(�*�*��<�+

� ��G���������������� �����)�����������G���������� �����������

� ����-��������������������!��)�����-���� �������2

Page 22: The Principles of Secure Development - Epicenter Dublin

��� �������������������������������

� �������"������� �����

� @���������EF ��������!���G�������������������������������

� C��������������������� )�����-��������!������)�������

� �D?�� ������G������������!�������%� ����������������

Page 23: The Principles of Secure Development - Epicenter Dublin

+���#�����������������������������!��,�

� �����!��#������"�B���������K*AE

� �����G������ ��������@, ������01� �����

� ���)����������� ������2

� ��������������� ����������������?������(���)���������&��� +

Page 24: The Principles of Secure Development - Epicenter Dublin

+���#�����������������������������!��,�

Page 25: The Principles of Secure Development - Epicenter Dublin

*�������������)����������������������������

� . )������ !��������� ��������������� ��

� ��������������������������� ������ �����

� ���� �������� �!�������������������� ������������

� ��� ����������������������!���G��������� �����������������

Page 26: The Principles of Secure Development - Epicenter Dublin

�'���������

"������*,���� �� ��������������������������S�"�B����*.��(�C���.� &����+�

� @H!�)�����������������=

O������P� ���(�������*���+O>������P

,���������������������������� ��������������������-���

Page 27: The Principles of Secure Development - Epicenter Dublin

�'���������

"������*,���� �� ��������������������������S�������*%�?4<���� ("�B����*.��(�C���.� &����++

� ?������������ �-�����������=

S �T������S-�T� ���(�������*���+S �T>������S-�T

Page 28: The Principles of Secure Development - Epicenter Dublin

�'�������)�

UE>���>���>��� �����#$�T����M�-��F�#$�DP��)(+T����M�� ���F�M�-�DP�����(N�� ��N+T�������M�-�DP������(+T��������R����������M�� ���T

&��������� �����������)����������� �������������������

Page 29: The Principles of Secure Development - Epicenter Dublin

�'�������)�

UE>���>���>��� �����#$�T�����%�?4==<�������T����M�-��F�#$�DP��)(+T����M�� ���F�M�-�DP�����(N�� ��N+T�������M�-�DP������(+T��������R�����������!�%�?4==<�������==�����(M�� ��+T�

@������)� ��)����%�?4�������

Page 30: The Principles of Secure Development - Epicenter Dublin

�'�����������

����� �� �������������� ��-� ����-����������

����������� ������������ ��

������������������

������������ ����������� ����������

�������� �!"����"#$ !$�

%��!$&"�����%"�'� (!�&)"� ���

����=>>)))*����� �����*��>���*��� 2���F?����

�������� ��� ���������-��������C"4

����=>>)))*����� �����*��>���*��� 2���F?����� &�������� ���F8

&���������� ��-�F����������� ���-�

Page 31: The Principles of Secure Development - Epicenter Dublin

�'�����������

��� ���� ��� �����J�

��� ������������� ����(�����-VW���-�+�J�

�����-��� ����F������=>>�����������'�*�*�>�X�����*��� �T

��� J

C"4��� �F���) C"4(�� ���+T

���������������F��� *���������(+T

��*� ��(+T

L������ (<���������+�J�>>�����������������������������������

������*��*����� �(�<������B������- ��Q��*-��?����-�(++T

LL�L

Page 32: The Principles of Secure Development - Epicenter Dublin

�'����������

��)���������)���������!��������������

�<4<#� Y�."@? @������,%<"< � �<� "�(R< "!�@��������+�F�811:

R������ ���������-������������-� �������=

�����-��B �F���<4<#��Y�."@?�@������,%<"<�� �<� "�(R< "!�@��������+�F��Q�����*����R�����*����+T

.�� �������� ��������������������� �������34���'�����

1T��<4<�< ."@? @������,%<"< ���F�N��������NTDD

Page 33: The Principles of Secure Development - Epicenter Dublin

�'����������

�����- �����-;� ���F�����R�����*����T"�-������F���) "�-��(Z�I��+T?�������F���*?����(���������*����+T�� (�*�������+J>>���������&@����������!����������������-*

L� ��J��� ���;� ���F����*�����(�����-;� ��+T�� ((���;� ���O�0::1+�[[�(���;� ���P���������*&)*R���++J>>�����������������-�!����������������-*

LL

Page 34: The Principles of Secure Development - Epicenter Dublin

�'����������������������#��������-

,���� �������������� ���������C"4�����)������������@?

����=>>����� �����*��>���*���2����F�����

����������������-������������F��� �������)�����������������-�=

O������P������F�������*C"4*�����@�(�����F�+QAT��������*)����(�������*C"4*��������-(��!�������*C"4* ��-��++TO>������P

,����� ������� ��������������F �� �����������'�����-������������@?

Page 35: The Principles of Secure Development - Epicenter Dublin

�'����������������������#��������-

O������P�������F�������*C"4*�����@�(�����F�+QAT���������F�������*C"4*��������-(��!�������*C"4* ��-��+T����(����*�����(>\V�D/ D]WM>++�J��������*)����(����+T�L�� ���J�)���)*� ���(����� ��������E�+T�L�O>������P

Page 36: The Principles of Secure Development - Epicenter Dublin

� ������;� ������^ ,����.�#�/������

� @������;� ������^ ,����.�#�/�����������������������

� <����%��� ��-^ #�����������*�����

� ����������������� ����������^ (����������0��������#�������������1���0��2

� �������?���-�����^ ������������������������#�%���0��2

� �������#�����������^ ������� �������������������

� �����������-�^ ������� ����������)����������

� �������"������� �����^ ���������������������������������������������� ������2�����!�����

���������������������� ���������

Page 37: The Principles of Secure Development - Epicenter Dublin

�������������������������

� ��G����������-������������� ���������������������

� ��������G������)�)��� !�����'������������!��������������)���

� ��G���������������������������-���������!�����-�������

� �������-�����-������������ ���������������-����'�������������-

� ����������� ����������G����������������!�H��� ��E

Page 38: The Principles of Secure Development - Epicenter Dublin

(���������������������3456

� ,����������������0:59����������������� 2

Page 39: The Principles of Secure Development - Epicenter Dublin

$����� ������������������������������

Page 40: The Principles of Secure Development - Epicenter Dublin

(���������������������3456

� ,����������������0:59����������������� 2

� @H!������� ��)����������������0:59�������� ���������������2

� ��?��� ����������������������-�������������������

� "��������)�����������������������������-�����)��� 2

Page 41: The Principles of Secure Development - Epicenter Dublin
Page 42: The Principles of Secure Development - Epicenter Dublin
Page 43: The Principles of Secure Development - Epicenter Dublin
Page 44: The Principles of Secure Development - Epicenter Dublin
Page 45: The Principles of Secure Development - Epicenter Dublin

(���������������������3456

� ���������������0:59�������� ��� ������811:

� 0�� ;����^ ����������������� ����������

� 8�� ;����^ �������#�����������

� 6�� ����_�� ;�����^ ;� �����������<����%��� ��-

Page 46: The Principles of Secure Development - Epicenter Dublin

��������������� ��

���������

������� �� ����������� ���������������� ��

��������

�������� �����

! �� �� �� ���" ��������

#�������������������������� ��"���

�������$������"���

%���������������

������������� ��������� ����$&'

(� �����)���������������

���� ��!���

$������ ���������"�� ������� ��

0���

�����)

�������!

��������7���������

������

������

�����������

������������������

3

89

:

Page 47: The Principles of Secure Development - Epicenter Dublin

������������)������������

� )))*�����������'�*�*����� )))*�����������'�*��^ �������!�������������)������������������������!��'�������������� �����������- �

� ����=>>��*����*�-���� ����=>>� �*����*�->����^ #�����������)����������������������!���������������

� ����=>>)))*)���*�-^ �'���������������������������������)��������������������������

� ����=>>)))*����������*��*��>�����������)���>� -�>^ ; ������������)�������������!�����������������������)�

� ����=>>)))*�� )1��*��>^ �������������'������������������'���������������������)���������������������������

� ����=>>'�������-������*� -���*��>^ #�����������)����������������������!�����

� ����=>>)))*)��������*�->^ ����������������������)����������������������!���������

� ����=>>)))*�)�����*��>�����������'�^ <!�)���������������������������!����������������������)�����

Page 48: The Principles of Secure Development - Epicenter Dublin

��������������������������2�����!��)����������

� ���� �����=�#�����������������-�<�� ���������������^ #�+=�=�����>�3?45:43?:9�

� ����������������� ������4������ �^ #�+=�=�����>�@59?A883:@

� �������?�� ��-^ #�+=�=�����>�@59?A34439

� ���������?������=�"�� ����-�.���!�C����������!���������^ #�+=�=�����>�@9839:4464

� ���)������������=���� ���-������������^ #�+=�=�����>�@9839?A5@?

� ���� ��������)������������� ���������=�����������-��������������-����)����;� ������ �����^ #�+=�=�����>�@983::::8A

� ���� ��������)�������������������-=�����������-����)�������������. �)�^ #�+=�=�����>�@9839@:6A3

� .�//��-=�������.����;� ������ ������������^ #�+=�=�����>�@983::A334

Page 49: The Principles of Secure Development - Epicenter Dublin

)))*�����������'�*�*�)))*���������� �����*�*�

�)�����=�Z�����������'�

������"!������������-�����������=�@, ������ ���!�01������������