ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 58 - CS0-003 discussion

Report
Export

A security analyst is trying to identify anomalies on the network routing. Which of the following functions can the analyst use on a shell script to achieve the objective most accurately?

A.
function x() { info=$(geoiplookup $1) && echo '$1 | $info' }
Answers
A.
function x() { info=$(geoiplookup $1) && echo '$1 | $info' }
B.
function x() { info=$(ping -c 1 $1 | awk -F '/' 'END{print $5}') && echo '$1 | $info' }
Answers
B.
function x() { info=$(ping -c 1 $1 | awk -F '/' 'END{print $5}') && echo '$1 | $info' }
C.
function x() { info=$(dig $(dig -x $1 | grep PTR | tail -n 1 | awk -F '.in-addr' '{print $1} ').origin.asn.cymru.com TXT +short) && echo '$1 | $info' }
Answers
C.
function x() { info=$(dig $(dig -x $1 | grep PTR | tail -n 1 | awk -F '.in-addr' '{print $1} ').origin.asn.cymru.com TXT +short) && echo '$1 | $info' }
D.
function x() { info=$(traceroute -m 40 $1 | awk 'END{print $1}') && echo '$1 | $info' }
Answers
D.
function x() { info=$(traceroute -m 40 $1 | awk 'END{print $1}') && echo '$1 | $info' }
Suggested answer: C

Explanation:

The function that can be used on a shell script to identify anomalies on the network routing most accurately is:

function x() { info=(dig(dig -x $1 | grep PTR | tail -n 1 | awk -F ''.in-addr'' '{print $1} ').origin.asn.cymru.com TXT +short) && echo ''$1 | $info'' }

This function takes an IP address as an argument and performs two DNS lookups using the dig command. The first lookup uses the -x option to perform a reverse DNS lookup and get the hostname associated with the IP address. The second lookup uses the origin.asn.cymru.com domain to get the autonomous system number (ASN) and other information related to the IP address. The function then prints the IP address and the ASN information, which can help identify any routing anomalies or inconsistencies

asked 02/10/2024
Federico Miliacca
33 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first