Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
heyglen committed Nov 16, 2018
1 parent b7fda70 commit 00ee76d
Show file tree
Hide file tree
Showing 14 changed files with 10,538 additions and 35 deletions.
42 changes: 42 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,45 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.


Licenses for incorporated software

Network Tech contains some code derived from the following sources:

The source file network_tech/lib/pw_type5.py contains code derived from the original passlib

Passlib Project: https://bitbucket.org/ecollins/passlib/src/849ab1e6b5d4ace4c727a63d4adec928d6d72c13/LICENSE?at=default&fileviewer=file-view-default

Passlib is available under the BSD License (https://opensource.org/licenses/bsd-license.php):

Passlib
Copyright (c) 2008-2017 Assurance Technologies, LLC.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

* Neither the name of Assurance Technologies, nor the names of the
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14 changes: 14 additions & 0 deletions Symbol Index.tmPreferences
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>name</key>
<string>Symbol Index</string>
<key>scope</key>
<string>cisco.scope</string>
<key>settings</key>
<dict>
<key>showInIndexedSymbolList</key>
<integer>1</integer>
</dict>
</dict>
</plist>
103 changes: 77 additions & 26 deletions cisco-ios.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ contexts:
- include: ip_classless
- include: aaa_new_model
- include: system_version
- include: enable_secret
- include: enable_password
- include: aaa_authentication
- include: ipv6_unicast_routing
Expand Down Expand Up @@ -640,7 +641,9 @@ contexts:
\s+
(?:(privilege)\s+(\d+)\s+)?
(?:
(?:(secret)\s+(5)\s+(\S+))|
(?:(secret)\s+(\S+))|
(?:(password)\s+(secret\s+)?(5)\s+(\S+))|
(?:(password)\s+(\d+)\s+(\S+))
)?
captures:
Expand All @@ -649,10 +652,17 @@ contexts:
3: support.constant # privilege
4: constant.numeric # privilege id
5: support.constant # secret
6: string.unquoted # secret password string
7: support.constant # password
8: constant.numeric # password type
9: string.unquoted # password string
6: constant.numeric # secret type 5
7: string.unquoted.cisco.password.type.5 # secret type 5 password string
8: support.constant # secret
9: string.unquoted # secret password string
10: support.constant # password
11: support.constant # password secret
12: constant.numeric # password type
13: string.unquoted.cisco.password.type.5 # password string
14: support.constant # password
15: constant.numeric # password type
16: string.unquoted # password string
vrf_upgrade:
- match: ^\s*(vrf)\s+(upgrade-cli)\s+(multi-af-mode)\s+((?:non-)?common-policies)(?:(?:\s+(vrf)\s+(\S+)(?:\s+(force))?)|(\s+force))?
Expand All @@ -679,11 +689,45 @@ contexts:
\s*
(enable)\s+
(password)\s+
(\S+)
(?:
(?:(5)\s+(\S+))|
(?:(7)\s+(\S+))|
(?:(\d+)\s+(\S+))|
(\S+)
)
captures:
1: support.constant
2: support.constant
3: string.unquoted
3: constant.numeric
4: string.unquoted.cisco.password.type.5
5: constant.numeric
6: string.unquoted.cisco.password.type.7
7: constant.numeric
8: string.unquoted
9: string.unquoted
enable_secret:
- match: |
(?xi)
\s*
(enable)\s+
(secret)\s+
(?:
(?:(5)\s+(\S+))|
(?:(7)\s+(\S+))|
(?:(\d+)\s+(\S+))|
(\S+)
)
captures:
1: support.constant
2: support.constant
3: constant.numeric
4: string.unquoted.cisco.password.type.5
5: constant.numeric
6: string.unquoted.cisco.password.type.7
7: constant.numeric
8: string.unquoted
9: string.unquoted
aaa_new_model:
- match: |
Expand Down Expand Up @@ -1873,7 +1917,12 @@ contexts:
(?:(ip\s+pim)\s+((?:(?:sparse)|(?:dense))-mode))|
(?:(ip\s+ospf)\s+
(?:
(?:(message-digest-key)\s+(\d+)\s+({{hashing_algorithms}})\s+(\d+)\s+(\S+))|
(?:(message-digest-key)\s+(\d+)\s+({{hashing_algorithms}})\s+
(?:
(?:(7)\s+(\S+))|
(?:(\d+)\s+(\S+))
)
)|
(?:(cost)\s+(\d+))
)
)|
Expand Down Expand Up @@ -1971,25 +2020,27 @@ contexts:
54: support.constant # ip ospf
55: support.constant # ip ospf message-digest-key
56: constant.numeric # ip ospf message-digest-key id
57: entity.other.attribute-name # ip ospf message-digest-key hash
58: constant.numeric # ip ospf message-digest-key password type
59: string.unquoted # ip ospf message-digest-key password
60: support.constant # ip ospf cost
61: constant.numeric # ip ospf cost value
62: support.constant # spanning-tree
63: support.constant # spanning-tree portfast
64: support.constant # spanning-tree portfast edge
65: support.constant # spanning-tree bpduguard
66: entity.other.attribute-name # spanning-tree bpduguard enable
67: keyword.other # spanning-tree bpduguard disable
68: support.constant # service-policy
69: support.constant # service-policy input/output
70: string.unquoted # service-policy input/output name
71: support.constant # logging event
72: support.constant # logging event link-status
73: support.constant # logging event trunk-status
74: support.constant # vpc
75: constant.numeric # vpc id
57: entity.other.attribute-name # ip ospf message-digest-key hash
58: constant.numeric # ip ospf message-digest-key password type 7
59: string.unquoted.cisco.password.type.7 # ip ospf message-digest-key 7 password
60: constant.numeric # ip ospf message-digest-key password type
61: string.unquoted # ip ospf message-digest-key password
62: support.constant # ip ospf cost
63: constant.numeric # ip ospf cost value
64: support.constant # spanning-tree
65: support.constant # spanning-tree portfast
66: support.constant # spanning-tree portfast edge
67: support.constant # spanning-tree bpduguard
68: entity.other.attribute-name # spanning-tree bpduguard enable
69: keyword.other # spanning-tree bpduguard disable
70: support.constant # service-policy
71: support.constant # service-policy input/output
72: string.unquoted # service-policy input/output name
73: support.constant # logging event
74: support.constant # logging event link-status
75: support.constant # logging event trunk-status
76: support.constant # vpc
77: constant.numeric # vpc id
- include: pop_on_configure_terminal_context
# - include: partials
Expand Down
14 changes: 9 additions & 5 deletions cisco.ios.indents.tmPreferences
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
Expand All @@ -14,7 +13,7 @@
<string>(?xi)
^\s*
(?:
(?:configure\s+terminal)|
(?:conf(?:igure)?\s+t(?:erminal)?)|
(?:vlan\s+\d+)|
(?:
interface\s+
Expand Down Expand Up @@ -62,18 +61,23 @@
(?:address-family\s+ipv[46](?:\s+vrf\s+\S+)?)|
(?:line\s+vty\s+\d+\s+\d+)
)
\s*(?:[#!].*)?$
\s*
(?:[#!].*)?
$
</string>

<key>decreaseIndentPattern</key>
<string>(?xi)
^\s*
\b
(?:
(?:exit)|
(?:exit-address-family)|
(?:end)
)
\s*(?:[#!].*)?$
\b
\s*
(?:[#!].*)?
$
</string>
</dict>
</dict>
Expand Down
1 change: 1 addition & 0 deletions cisco.tmPreferences
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
(?:
^\s*
(?:
(?:conf\s+)|
(?:description\s+)|
(?:neighbor\s+\S+\s+description\s+)
)
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Contents
syntax
snippets
context_info
password_decode
Jumping <jumping>
Search <network_search>
Bugs & Requests <feature_requets_and_bugs>
Expand Down
31 changes: 31 additions & 0 deletions docs/password_decode.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Password Decode
===============

.. Important::

All password decoding is done locally on your machine

Verify in the code:

`Type 5 Decode <https://github.com/heyglen/network_tech/tree/master/lib/pw_type5>`_

`Type 7 Decode <https://github.com/heyglen/network_tech/tree/master/lib/pw_type7>`_


Type 5
------

Password decode method: Brute Force - 10k most common passwords

If the password can be brute forced, then mousing over the command

``enable secret 5 $1$SpMm$eALjeyED.WSZs0naLNv21/``

will display a popup with the clear text password

Password source: `SecLists 10k Most Common <https://github.com/danielmiessler/SecLists/blob/master/Passwords/Common-Credentials/10k-most-common.txt>`_

Type 7
------

Mouse over type 7 passwords such as ``enable password 7 0822455D0A16``` to get the clear text password
Loading

0 comments on commit 00ee76d

Please sign in to comment.