Friday, 30 November 2018

ServiceNow Certified Implementation Specialist Exam Practice

ServiceNow Certified Implementation Specialist
Instruction : 
  • Number of Question : 150
  • You dont have time Limit here as its because of testing you own knowledge
  • Must not be finished in one shot.
  • 10 - 15 question will be displayed in one page
  • You can go back and change your answer
  • You have to attend all the questions
  • Passing percentage your own integrity.

This Exam is Powered by Testmoz!

Click on below link to start the exam.

Practice ServiceNow System Administration Exam

ServiceNow Certified System Administrator  

Instruction : 
  • Number of Question : 60
  • Has a time limit of 90 Minut
  • Must be finished in one shot.
  • 10 question will be displayed in one page
  • You can go back and change your answer
  • You have to attend all the questions
  • Passing percentage of this exam is 70%

This Exam is Powered by Classmaker !

Click on below link to start the exam.



Start ServiceNow Administration Exam



All the Best!!

Security Operation Certification preparation


1)Which business rule is used for creating a Ci
A. Determine CI from Network Details
B. Create CI from Vulnerable Item

2)Vulnerability Groups are used to group Vulnerable Items based on ______. (Select all that apply)
A. Vulnerability
 B. Vulnerable Item Condition
C. Filter Group
D. Assignment Group

3)Which of the following is a common integration point between Vulnerability and GRC?
A. Risk Indicators
 B. Problem
C. Change
D. Security Incident Response
4) Which of the following is true about workflows in Vulnerability Response.
A. Any user with sn_vul.vulnerability_read can edit the workflow.
B. Users with sn_vul. vulnerability _write cannot view the workflows
C. There are no workflows available with vulnerability plugin
D. Users with admin role cannot edit vulnerability workflow without sn_vul.admin
5)GRC is available with vulnerability plugin for the management of risk assessments, risk indicators, and risk issues.
A. TRUE
B. FALSE
6)Which of the following are available on Vulnerability overview(choose all that apply)
A. Vulnerable items by CI
B. Vulnerable items by CVE
C. Vulnerable items by score
D. Vulnerable items by Impact
7) Which plugin must be activated to enable vulnerability response with third party integrations like qualys,rapid7.
A. Vulnerability response
B. Threat intelligence
C. Trusted Security Circles Client
D. Security Incident Response

8)Clicking on close/defer ui action will set vulnerable item to false;
A. True
B. False
9)Applications from Servicenow store are maintained by
A. organizations that created the Application
B. Servicenow Support

10)what is vulnerability
ANS: Any weakness that allows exploitation or an attacker to further reduce security posture.
11)who will maintain CVE and CWE
12)What is the prefix for Vulnerability scope tables
Ans: sn_vul.
13) which property is used for auto creation of vulnerability groups.
Ans:sn_vul.autocreate_vul_centric_group.
14)when creating change from VIT it is recommended to assign the change task to CI owner (Assigned to)
A. true
B. False
15) Which of the following ciso/cio requires on reporting dashboard (select all that apply)(2 questions)
A. overview
B. Drill down reporting
C. Single, overall health of the organization
D. up-to-date minute view


17. which of the following is not available on vulnerability groups.
A. Vulnerability
B. Condition
C. Filter groups
D. Advanced script

18. Closing vulnerability group with exception will close all vulnerable items in the group.
A. True
B. False.

19. What will you recommend your client(donot remember the question exactly)
Ans: Keep CMDB updated.

20. Which of the following business rules are available with Vulnerability plugin.
A. Add Vulnerable Item CI to Task
B. Associate VIs on Condition Change
C. Determine vulnerable items
D. Clear Vulnerability if Custom Filter

21. Vulnerable items created from Qualys scanner are created as
A. Import sets
B. Update sets

22.Which role is required to edit vulnerability workflows.
Ans: sn_vul.admin

23.workflows created for approval of vulnerable item is tagged to which table
ANS:    sn_vul_change_approval

24.CVE’s are imported from
ANS: National vulnerability database

25. What is CWE
ANS: Common weakness enumeration

26. CVE deals with software weakness and find a way of effectively managing the softwares.
True/false.
ANS: false
27. Path for filter groups
ANS: security operations>groups>filter groups

Script to Trigger scheduled_import_set / sysauto_script / sysauto_template / sysauto_report from Server Side Script in ServiceNow

Following code you can have to trigger schedule job from business rule.

var schImp_GR = new GlideRecord('sysauto');
schImp_GR.addQuery('name','<name>');
schImp_GR.query();
if(schImp_GR.next()){
SncTriggerSynchronizer.executeNow(schImp_GR); // this is for global scope
}

Or

var rec = new GlideRecord('sysauto_script');
rec.get('name', 'YOUR_JOB_NAME_HERE');
if (typeof SncTriggerSynchronizer != 'undefined')
   SncTriggerSynchronizer.executeNow(rec);
else
   Packages.com.snc.automation.TriggerSynchronizer.executeNow(rec);


You can modify the script below by adding your scheduled job name and querying the appropriate table for your scheduled job as shown here. This will not work if you simply query the ‘sysauto’ table. You must query one of the extensions below directly.
  • ‘scheduled_import_set’ (Scheduled Import Sets)
  • ‘sysauto_script’ (Scheduled Script Execution)
  • ‘sysauto_template’ (Scheduled Template Generation)
  • ‘sysauto_report’ (Scheduled Report)

Email Format to send mail from ServiceNow Workflow

Email Preview : 




Script 

<html>
<head><title></title></head>
<body style="width:99%">
<table style="width:100%; border-top: 1px solid #909090; border-bottom: 1px solid#909090">
<tr style="font-family: Calibri; background-color: #088A08; width: 100%; color: #FFFFFF; text-align: center; font-size: 18px;">
<td><b>Mailbox Creation</b></td>
</tr>
</table>
<br />
                                <p style="font-family: Calibri; color: black">Hi,</p>
                                <p style="font-family: Calibri; color: black">  Request has been completed.<br/>Please check below the details</p>

<table style="width: 60%;">
                                                                <tr>
                                                                                <td style="font-family: Calibri; border: thin solid #C0C0C0; background-color: #F8F8FF; color: #0C090A; font-family: Calibri; font-weight: bold; ">User Name</td>
                                                                                <td colspan="4" style="font-family: Calibri; border: thin solid #C0C0C0"> "Value"</td>
                                                                </tr>
                                                                <tr>
                                                                                <td style="font-family: Calibri; border: thin solid #C0C0C0; background-color: #F8F8FF; color: #0C090A; font-family: Calibri; font-weight: bold; ">Email-ID</td>
                                                                                <td colspan="4" style="font-family: Calibri; border: thin solid #C0C0C0"> "Value"</td>
                                                                </tr>
<tr>
                                                                                <td style="font-family: Calibri; border: thin solid #C0C0C0; background-color: #F8F8FF; color: #0C090A; font-family: Calibri; font-weight: bold; ">Password</td>
                                                                                <td colspan="4" style="font-family: Calibri; border: thin solid #C0C0C0"> "Value"</td>
                                                                </tr>
 </table>
<br />
<p style="font-family: Calibri; color: black"> Dear Team</p>
<p style="font-family: Calibri; color: black">  
<p style="font-family: Calibri; color: black; ">Regards<br /><b>Service Desk.</b></p>
<p style="font-family: Calibri; font-size: ; color: black">Note: This is a system generated email. Please do not reply to this.</p>
</body>
</html>

ServiceNow and Zscaler Integration using REST Message

REST API to Integration Zscaler and ServiceNow

var vZScalerAPIKEY = "<Api Key>";
//****** Get time in miliseconds**************************//
var vDate = new Date();
var vTimestamp = vDate.getTime().toString();
var vHigh = vTimestamp.substring(vTimestamp.length - 6);
var vLow = (parseInt(vHigh) >> 1).toString();
var vApiKey = "";
while (vLow.length < 6) {
low = "0" + vLow;
}
for (var i = 0; i < vHigh.length; i++) {
vApiKey += vZScalerAPIKEY.charAt(parseInt(vHigh.charAt(i)));
}
for (var j = 0; j < vHigh.length; j++) {
vApiKey += vZScalerAPIKEY.charAt(parseInt(vLow.charAt(j)) + 2);
}


//************************Authentication to Zscaler *****************//
var vSessionId ='';
var user = "<UserName>";
var password = "<Password>";


var vAuthbody = '{"username":"'+user+'","password":"'+password+'","apiKey":"'+vApiKey+'","timestamp":"'+vTimestamp+'"}';
var  vAuthentication= new sn_ws.RESTMessageV2();
vAuthentication.setEndpoint("<End Point>");
vAuthentication.setRequestHeader("cache-control","no-cache");
vAuthentication.setRequestHeader('content-type','application/json');
vAuthentication.setHttpMethod("post");
vAuthentication.setRequestBody(vAuthbody);
var vAuthResponse = vAuthentication.execute();
var vAuthResponseBody = vAuthResponse.getBody();
var vAuthHttpStatus = vAuthResponse.getStatusCode();
var cookies = vAuthResponse.getCookies();
var i;
for(i=0;i<1;i++) {
var vJID =  (cookies.get(i)).split(';');
vSessionId  = vJID[0];
}

gs.print(vSessionId);
gs.print(vAuthResponseBody);
gs.print(vBlockurlHttpStatus );

IOT Based Smart Parking System -- Integration between ServiceNow and Live Sensors Part 3

Script to created record in MID Server dynamically for Light Sensor: 


var midServerToUse = '',pay = "";

var instance = gs.getProperty('instance_name');

midServerToUse = "mid.server." + gs.getProperty('CreateAThon_MidServer_Name'); //Mid Server Used

if (JSUtil.notNil(midServerToUse)) {
var params = '<?xml version="1.0" encoding="UTF-8"?><parameters><parameter name="used_by_runbook" value="true"/><parameter name="glide.xmlhelper.trim.enable" value="true"/><parameter name="debug" value="true"/><parameter name="workflow" value="a3b5e4a44f915300869e4a318110c721"/><parameter name="skip_simple_parameter_substitution" value="true"/><parameter name="debug_ssh" value="true"/><parameter name="execution_sys_id" value="efb5e4a44f915300869e4a318110c722"/><parameter name="probe_name" value="SSHCommand"/><parameter name="skip_sensor" value="true"/><parameter name="probe" value="e07f03e8c0a800670196a29829b0e452"/><parameter name="credential_id" value="597324644f915300869e4a318110c73e"/></parameters>';
//Input of the curl command to be executed in ECC Queue
var flag = "false";
var outq = new GlideRecord('ecc_queue');
outq.initialize();
outq.agent = midServerToUse;
outq.topic = "SSHCommand";
outq.name = "cd /servicenow/Light_Sensor/;python light_sensor.py";
outq.queue = "output";
outq.payload = params;
outq.source = gs.getProperty('CreateAThon.source.ipaddress');
var s = outq.insert();
gs.sleep(6000);

// Output we Get After Execution is processed
var inqu = new GlideRecord('ecc_queue');
inqu.addEncodedQuery("topicLIKESSHCommand");
inqu.addQuery("response_to", s);
inqu.addQuery("agent", midServerToUse);
inqu.query();
while (inqu.next()) {
var xmlDoc = new XMLDocument2();
xmlDoc.parseXML(inqu.payload);
pay = xmlDoc.getNodeText("//output");
}
return pay;
}



Script to created record in MID Server dynamically for Parking Sensor: 



var midServerToUse = '',pay = "";

var instance = gs.getProperty('instance_name');

midServerToUse = "mid.server." + gs.getProperty('CreateAThon_MidServer_Name'); //Mid Server Used

if (JSUtil.notNil(midServerToUse)) {
var params = '<?xml version="1.0" encoding="UTF-8"?><parameters><parameter name="used_by_runbook" value="true"/><parameter name="glide.xmlhelper.trim.enable" value="true"/><parameter name="debug" value="true"/><parameter name="workflow" value="9a44ec644f915300869e4a318110c700"/><parameter name="skip_simple_parameter_substitution" value="true"/><parameter name="debug_ssh" value="true"/><parameter name="execution_sys_id" value="d644ec644f915300869e4a318110c702"/><parameter name="probe_name" value="SSHCommand"/><parameter name="skip_sensor" value="true"/><parameter name="probe" value="e07f03e8c0a800670196a29829b0e452"/><parameter name="credential_id" value="597324644f915300869e4a318110c73e"/></parameters>';
//Input of the curl command to be executed in ECC Queue
var flag = "false";
var outq = new GlideRecord('ecc_queue');
outq.initialize();
outq.agent = midServerToUse;
outq.topic = "SSHCommand";
outq.name = "cd /servicenow/distance_sensor/;python distance.py";
outq.queue = "output";
outq.payload = params;
outq.source = gs.getProperty('CreateAThon.source.ipaddress');
var s = outq.insert();
gs.sleep(6000);

// Output we Get After Execution is processed
var inqu = new GlideRecord('ecc_queue');
inqu.addEncodedQuery("topicLIKESSHCommand");
inqu.addQuery("response_to", s);
inqu.addQuery("agent", midServerToUse);
inqu.query();
while (inqu.next()) {
var xmlDoc = new XMLDocument2();
xmlDoc.parseXML(inqu.payload);
pay = xmlDoc.getNodeText("//output");
}
return pay;
}

IOT Based Smart Parking System -- Integration between ServiceNow and Live Sensors Part 2



Business Rule: Create Incident based on Time and status
On Custom table.

          var gr = new GlideRecord('incident');
          gr.initialize();
          gr.caller_id = gs.getUserName();
          gr.short_description = 'Light is on the floor';
          gr.assignment_group = "5f6441efc0a8010e0177fcb589156352";
          gr.assigned_to = "63b4c2cd0bb23200ecfd818393673a95";
          gr.impact= "1";
          gr.urgency= "2";
          gr.insert();


Business Rule: Send mail on incident creation

gs.eventQueue('incident.commented', current, gs.getUserID(), gs.getUserName());



Email Notification: CreateAThonNOtification fired based on event

Template:

EmailTemplate

Subject:
Light is on the Floor Incident No ${current.number}

Body:
<p>&nbsp;</p>
<table style="width: 100%; border-top: 1px solid #909090; border-bottom: 1px solid#909090;">
<tbody>
<tr style="font-family: Calibri; background-color: #239604; width: 100%; color: #ffffff; text-align: center; font-size: 24px;">
<td><strong>Light-On Notifiation</strong></td>
</tr>
</tbody>
</table>
<p>Hi,</p>
<p style="font-family: Calibri; color: black;">You have been assigned the following incident to turn off the light.<br />Please check below the details</p>
<p>&nbsp;</p>
<table style="width: 60%; background-color: #ccf3f1;">
<tbody>
<tr>
<td style="font-family: Calibri; color: #0c090a; font-weight: bold;">Incident Number :</td>
<td style="font-family: Calibri;" colspan="4">${URI_REF}</td>
</tr>
<tr>
<td style="font-family: Calibri; color: #0c090a; font-weight: bold;">Short Description :</td>
<td style="font-family: Calibri;" colspan="4">${current.short_description}</td>
</tr>
</tbody>
</table>
<p>This is system generated mail please do not reply on this.</p>
<p>&nbsp;</p>





IOT Based Smart Parking System -- Integration between ServiceNow and Live Sensors Part 1


Things to do in ServiceNow and mid server:


1.    MID Server name, Instance name, User and password in mid server file
2.    IP address of mid server in workflow
3.    Raspberry PI and Laptop should be in same network  
4.    Credentials in credential table
5.    property for mid server name in payload
a.    CreateAThon_MidServer_Name
6.    property for mid server IP in payload
a.    CreateAThon.source.ipaddress
7.    Change field style in “sys_ui_style.LIST” for all the fields of table
a.    background-color:#B3BBC1;
font-size:14px;
color:black;




Scheduled Script: Fetch Parking Status

var midServerToUse = '',pay = "";

var instance = gs.getProperty('instance_name');

midServerToUse = "mid.server." + gs.getProperty('CreateAThon_MidServer_Name'); //Mid Server Used

var params = '<?xml version="1.0" encoding="UTF-8"?><parameters><parameter name="used_by_runbook" value="true"/><parameter name="glide.xmlhelper.trim.enable" value="true"/><parameter name="debug" value="true"/><parameter name="workflow" value="9a44ec644f915300869e4a318110c700"/><parameter name="skip_simple_parameter_substitution" value="true"/><parameter name="debug_ssh" value="true"/><parameter name="execution_sys_id" value="d644ec644f915300869e4a318110c702"/><parameter name="probe_name" value="SSHCommand"/><parameter name="skip_sensor" value="true"/><parameter name="probe" value="e07f03e8c0a800670196a29829b0e452"/></parameters>';
//Input of the curl command to be executed in ECC Queue
var flag = "false";
var outq = new GlideRecord('ecc_queue');
outq.initialize();
outq.agent = midServerToUse;
outq.topic = "SSHCommand";
outq.name = "cd /servicenow/distance_sensor/;python distance.py";
outq.queue = "output";
outq.payload = params;
outq.source = gs.getProperty('CreateAThon.source.ipaddress');
var s = outq.insert();
gs.sleep(6000);

//                           // Output we Get After Execution is processed
var inqu = new GlideRecord('ecc_queue');
inqu.addEncodedQuery("topicLIKESSHCommand");
inqu.addQuery("response_to", s);
inqu.addQuery("agent", midServerToUse);
inqu.query();
while (inqu.next()) {
          var xmlDoc = new XMLDocument2();
          xmlDoc.parseXML(inqu.payload);
          pay = xmlDoc.getNodeText("//output");
}

var gTrack = new GlideRecord('u_light_and_parking_space_track');
//gTrack.initialize();
gTrack.addQuery("sys_id","feaa832d4f511300784e045e9310c72a");
gTrack.query();
if(gTrack.next()){
          var res = pay.split(" ");
          if(res[1] < 100)
                   {
                   gTrack.u_status = 'false';
                   gTrack.update();
          }
          if(res[1]>= 100)
                   {
                  
                   gTrack.u_status = 'true';
                   gTrack.update();
          }
         
}

Scheduled Script: Fetch Light Status IOT

var midServerToUse = '',pay = "";
                   var instance = gs.getProperty('instance_name');
                   gs.info(instance);
                   midServerToUse = "mid.server." + gs.getProperty('x_112172_createath.CreateAThon_MidServer_Name'); //Mid Server Used

                             var params = '<?xml version="1.0" encoding="UTF-8"?><parameters><parameter name="used_by_runbook" value="true"/><parameter name="glide.xmlhelper.trim.enable" value="true"/><parameter name="debug" value="true"/><parameter name="workflow" value="a3b5e4a44f915300869e4a318110c721"/><parameter name="skip_simple_parameter_substitution" value="true"/><parameter name="debug_ssh" value="true"/><parameter name="execution_sys_id" value="efb5e4a44f915300869e4a318110c722"/><parameter name="probe_name" value="SSHCommand"/><parameter name="skip_sensor" value="true"/><parameter name="probe" value="e07f03e8c0a800670196a29829b0e452"/><parameter name="credential_id" value="597324644f915300869e4a318110c73e"/></parameters>';
                             //Input of the curl command to be executed in ECC Queue
                             var flag = "false";
                             var outq = new GlideRecord('ecc_queue');
                             outq.initialize();
                             outq.agent = midServerToUse;
                             outq.topic = "SSHCommand";
                             outq.name = "cd /servicenow/Light_Sensor/;python light_sensor.py";
                             outq.queue = "output";
                             outq.payload = params;
                             outq.source = gs.getProperty('x_112172_createath.CreateAThon.source.ipaddress');
                             var s = outq.insert();
                             gs.sleep(6000);
                            
                             // Output we Get After Execution is processed
                             var inqu = new GlideRecord('ecc_queue');
                             inqu.addEncodedQuery("topicLIKESSHCommand");
                             inqu.addQuery("response_to", s);
                             inqu.addQuery("agent", midServerToUse);
                             inqu.query();
                             while (inqu.next()) {
                                      var xmlDoc = new XMLDocument2();
                                      xmlDoc.parseXML(inqu.payload);
                                      pay = xmlDoc.getNodeText("//output");
                             }
                  
var gTrack = new GlideRecord('u_light_and_parking_space_track');
gTrack.initialize();
gTrack.u_sensor = "Light";
gTrack.u_status = pay;
gTrack.insert();



Scripted REST API to Check Parking availability in ServiceNow using Google Assistant

Scripted REST API:

(function process(/*REST API Request*/ request, /*REST API Response*/ response){
var state,assignTo,short_desc,nmbr,description,urgency,impact,priority,assignGroup,message;
/***************Recieve data from Google assistant for Incident***************/
var resWriter=response.getStreamWriter();
var headers={};
var responseobj = {};
var requestBody = request.body;
var requestobj = requestBody.data;
var displayName=requestobj.queryResult.intent.displayName;
var incident_number = requestobj.queryResult.parameters.incident_number;
var city_name = requestobj.queryResult.parameters.geo_city;
var company = requestobj.queryResult.parameters.companies;
var building = requestobj.queryResult.parameters.buildings;
short_desc = requestobj.queryResult.parameters.short_description;
var desc = requestobj.queryResult.parameters.description;
description=short_desc+desc;
/************************* Recieve Impact for Incident****************************************/
var imp=requestobj.queryResult.parameters.impact;
if(imp==1||"High" || "Hi"){
impact=imp;
}
if(imp==2||"medium"){
impact=imp;
}
if(imp==3||"low"){
impact=imp;
}
/************************* Recieve Urgency for Incident*************************************************/
var urg=requestobj.queryResult.parameters.urgency;
if(urg==1||"High" || "Hi"){
urgency=urg;
}
if(urg==2||"medium"){
urgency=urg;
}
if(urg==3||"low"){
urgency=urg;
}

if(displayName=='parking_availability')
{
var ub ='',lb='',slot_count,flag,company1,city1;
city_name = city_name.toLowerCase();
if(city_name == "banglore" || city_name == "bglr" || city_name == "bangaluru")
company = company.toLowerCase(); { city1 = "Bangalore"; }
if(company == "cts" || company == "cognizant technology solution")
else { city1 = city_name; } { company1 = "Cognizant";
gs.log("@@@"+company1);
} else { company1 = company; } gs.log("@@@"+city1);
g_parking.addQuery('u_city',city1);
var g_parking = new GlideRecord('u_light_and_parking_space_track'); g_parking.addQuery('u_company',company1);
{
g_parking.addQuery('u_building',building); g_parking.addQuery('u_status', 'false'); g_parking.query(); while(g_parking.next()) flag = "1";
ub_slots = ub.substring(0, ub.length - 1);
slot_count=g_parking.getRowCount(); if(g_parking.u_upper_basement == "UB") { ub= ub+"UB"+g_parking.u_slot_no+","; } if(g_parking.u_lower_basement == "LB") {
var message1="Total Number available slot "+ slot_count + "! Upper Basement Empty Slots are: " + ub_slots + " and Lower Basement Empty slots are: "+lb_slots+ "! Click on the below URL to go to that Location!";
lb= lb+"LB"+g_parking.u_slot_no+","; lb_slots = lb.substring(0, lb.length - 1); } } if(flag == "1") {
}
var message2 ="<http://www.google.com/maps/place/>"+g_parking.u_lattitude+","+g_parking.u_lognitude; message = message1 + message2; } else { message= "There is no parking available!"; }

/*****************Send response back to Ok Google **********************/
headers['Content-Type']='application/json';
response.setStatus(200);
response.setHeaders(headers);
var response_body={
"fulfillmentText": message ,
"payload": {
"google": {
"expectUserResponse": true,
"richResponse": {
"items": [
{
"simpleResponse": {
"textToSpeech": message
}
}
]
}
}
}
};
resWriter.writeString(global.JSON.stringify(response_body));
})(request, response);