v45.docx - et salt know that the(ASCII armored GPG key required to verify the repository\u2019s signature can be fetched from\/srv\/salt\/offsec-apt-key.asc

v45.docx - et salt know that the(ASCII armored GPG key...

This preview shows page 1 - 2 out of 6 pages.

et salt know that the (ASCII armored) GPG key required to verify the repository’s signature can be fetched from /srv/salt/offsec-apt-key.asc on the salt master. The require_in attribute ensures that this state is processed before the offsec-defaults, since the latter needs the repository correctly configured to be able to install the package. The offsec-defaults state installs the package of the same name. This shows that the name of the key is often an important value for states, although it can always be overridden with a name attribute (as done for the former state). For simple-cases like this one, this is both readable and concise. The last state (ssh_key_for_root) adds the SSH key given in the name attribute to /root/.ssh/ authorized_keys (the target user is set in the user attribute). Note that we have shortened the key for readability here, but you should put the full key in the name attribute. This state file can next be applied to a given minion: server# salt kali-scratch state.apply offsec kali-scratch: ---------- ID: offsec_repository Function: pkgrepo.managed Name: deb offsec-internal main Result: True Comment: Configured package repo ’deb offsec-internal main’ Started: 06:00:15.767794 Duration: 4707.35 ms Changes: ---------- repo: deb offsec-internal main ---------- ID: offsec-defaults Function: pkg.installed Result: True Comment: The following packages were installed/updated: offsec-defaults Started: 06:00:21.325184 Duration: 19246.041 ms Changes: ---------- offsec-defaults: ---------- new: 1.0 old: ---------- ID: ssh_key_for_root Function: ssh_auth.present 260 Kali Linux Revealed Name: ssh-rsa AAAAB3NzaC1yc2...89C4N [email protected] Result: True Comment: The authorized host key AAAAB3NzaC1yc2...89C4N for user root was added Started: 06:00:40.582539 Duration: 62.103 ms Changes: ---------- AAAAB3NzaC1yc2...89C4N: New Summary for kali-scratch ------------ Succeeded: 3 (changed=3) Failed: 0 ------------ Total states run: 3 Total run time: 24.015 s It can also be permanently associated to the minion by recording it in the /srv/salt/top.sls file, which is used by the state.highstate command to apply all relevant states in a single pass: server# cat /srv/salt/top.sls base: kali-scratch: - offsec server# salt kali-scratch state.highstate kali-scratch: ---------- ID: offsec_repository Function: pkgrepo.managed Name: deb offsec-internal main Result: True Comment: Package repo ’deb offsec-internal main’ already configured Started: 06:06:20.650053 Duration: 62.805 ms Changes: ---------- ID: offsec-defaults Function: pkg.installed Result: True Comment: Package offsec-defaults is already installed Started: 06:06:21.436193 Duration: 385.092 ms Changes: ---------- ID: ssh_key_for_root Chapter 10 — Kali Linux in the Enterprise 261 Function: ssh_auth.present Name: ssh-rsa AAAAB3NzaC1yc2...89C4N [email protected] Result: True Comment: The authorized host key AAAAB3NzaC1yc2...89C4N is already present for user root Started: 06:06:21.821811 Duration: 1.936 ms Changes: Summary for kali-scratch ------------ Succeeded: 3 Failed: 0 ------------ Total states run: 3 Total run time: 449.833 ms 10.3. Extending and Customizing Kali Linux Sometimes you need to modify Kali Linux to make it fit your local needs. The best way to achieve this is
Image of page 1
Image of page 2

You've reached the end of your free preview.

Want to read all 6 pages?

  • Summer '16
  • nushawan
  • Public-key cryptography, Debian, Package management system, Advanced Packaging Tool

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes